Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ clap = { version = "4.4", features = ["derive", "cargo"], optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
console_error_panic_hook = "0.1"
wee_alloc = "0.4"
# Note: wee_alloc was removed as it is unmaintained and has known memory leaks.
# Rust 1.71+ provides a suitable default allocator for wasm32 targets.

[dev-dependencies]
# Testing
Expand Down
6 changes: 2 additions & 4 deletions src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
use crate::{Error, NickelLoader};
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;
// Note: wee_alloc was removed as it is unmaintained and has known memory leaks.
// Rust 1.71+ provides a suitable default allocator for wasm32 targets.

/// Initialize WASM module
///
Expand Down
Loading