diff --git a/src-wasm/hello/Cargo.toml b/src-wasm/hello/Cargo.toml index c1b2bf68..7fd6c005 100644 --- a/src-wasm/hello/Cargo.toml +++ b/src-wasm/hello/Cargo.toml @@ -23,6 +23,7 @@ console_error_panic_hook = { version = "0.1.6", optional = true } # compared to the default allocator's ~10K. It is slower than the default # allocator, however. wee_alloc = { version = "0.4.5", optional = true } +wasm-bindgen-futures = "0.4.34" [dev-dependencies] wasm-bindgen-test = "0.3.13" diff --git a/src-wasm/hello/src/lib.rs b/src-wasm/hello/src/lib.rs index 8bad11a5..8ab83c58 100644 --- a/src-wasm/hello/src/lib.rs +++ b/src-wasm/hello/src/lib.rs @@ -1,14 +1,14 @@ -mod utils; - use wasm_bindgen::prelude::*; +mod utils; + // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global allocator. #[cfg(feature = "wee_alloc")] #[global_allocator] static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; #[wasm_bindgen] -extern { +extern "C" { fn alert(s: &str); #[wasm_bindgen(js_namespace = console)] diff --git a/src-web/App.tsx b/src-web/App.tsx index aecb65ae..46551323 100644 --- a/src-web/App.tsx +++ b/src-web/App.tsx @@ -39,7 +39,7 @@ function App() { -
+
- +