Skip to content

Commit

Permalink
wasm: drop unmaintained wee_alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlettman committed Aug 12, 2024
1 parent d915ea3 commit 6a92a8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 40 deletions.
35 changes: 5 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,5 @@ serde-wasm-bindgen = "0.6"
# 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. However, it is slower than the default
# allocator, so it's not enabled by default.
wee_alloc = { version = "0.4", optional = true }

[target.'cfg(any(target_arch = "wasm32", target_arch = "wasm64"))'.dev-dependencies]
wasm-bindgen-test = "0.3.37"
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ pub use switch_data::SwitchData;
pub use array::Array;
pub use file::File;

#[cfg(any(target_arch = "wasm32", target_arch = "wasm64"))]
#[cfg(feature = "wee_alloc")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

#[cfg(any(target_arch = "wasm32", target_arch = "wasm64"))]
pub fn set_panic_hook() {
// When the `console_error_panic_hook` feature is enabled, we can call the
Expand Down

0 comments on commit 6a92a8c

Please sign in to comment.