diff --git a/Cargo.toml b/Cargo.toml index 74da69b..f99c7bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/src/wasm.rs b/src/wasm.rs index 967975c..ef0d7c8 100644 --- a/src/wasm.rs +++ b/src/wasm.rs @@ -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 ///