mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
14 lines
431 B
Rust
14 lines
431 B
Rust
#[cfg(target_arch = "wasm32")]
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
sixtyfps::include_modules!();
|
|
|
|
#[cfg_attr(target_arch = "wasm32", wasm_bindgen(start))]
|
|
pub fn main() {
|
|
// This provides better error messages in debug mode.
|
|
// It's disabled in release mode so it doesn't bloat up the file size.
|
|
#[cfg(all(debug_assertions, target_arch = "wasm32"))]
|
|
console_error_panic_hook::set_once();
|
|
|
|
MainWindow::new().run();
|
|
}
|