mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 23:27:22 +00:00
19 lines
616 B
Rust
19 lines
616 B
Rust
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
slint::slint! {
|
|
export { AppWindow } from "../ui/demo.slint";
|
|
}
|
|
|
|
#[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();
|
|
|
|
AppWindow::new().expect("AppWindow::new() failed").run().expect("AppWindow::run() failed");
|
|
}
|