diff --git a/Cargo.toml b/Cargo.toml index 7c6003d..2383054 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,21 +11,16 @@ crate-type = ["cdylib", "rlib"] default = ["console_error_panic_hook"] [dependencies] -wasm-bindgen = "0.2.63" +wasm-bindgen = "0.2.84" # The `console_error_panic_hook` crate provides better debugging of panics by # logging them with `console.error`. This is great for development, but requires # all the `std::fmt` and `std::panicking` infrastructure, so isn't great for # code size when deploying. -console_error_panic_hook = { version = "0.1.6", optional = true } - -# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size -# compared to the default allocator's ~10K. It is slower than the default -# allocator, however. -wee_alloc = { version = "0.4.5", optional = true } +console_error_panic_hook = { version = "0.1.7", optional = true } [dev-dependencies] -wasm-bindgen-test = "0.3.13" +wasm-bindgen-test = "0.3.34" [profile.release] # Tell `rustc` to optimize for small code size. diff --git a/README.md b/README.md index be29ebd..6b68408 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,6 @@ wasm-pack publish between WebAssembly and JavaScript. * [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook) for logging panic messages to the developer console. -* [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized - for small code size. * `LICENSE-APACHE` and `LICENSE-MIT`: most Rust projects are licensed this way, so these are included for you ## License @@ -83,4 +81,4 @@ at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or -conditions. \ No newline at end of file +conditions. diff --git a/src/lib.rs b/src/lib.rs index 7f20bc7..3437786 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,14 +2,8 @@ mod utils; use wasm_bindgen::prelude::*; -// 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); }