chiark / gitweb /
wasm: No not use wee-alloc. It has bugs and seems unmaintained
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Mar 2022 14:16:17 +0000 (14:16 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Mar 2022 14:16:45 +0000 (14:16 +0000)
Cargo.lock
wasm/Cargo.toml
wasm/wasm.rs

index 2eb745db2b72cbdcf3f02c74aa4fc1ba1843a5bf..25df317c8647d41dd571c25b2ce159c0e3114415 100644 (file)
@@ -2016,12 +2016,6 @@ dependencies = [
  "autocfg",
 ]
 
-[[package]]
-name = "memory_units"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
-
 [[package]]
 name = "mime"
 version = "0.2.6"
@@ -2608,7 +2602,6 @@ dependencies = [
  "otter-base",
  "wasm-bindgen",
  "wasm-bindgen-cli",
- "wee_alloc",
 ]
 
 [[package]]
@@ -4856,18 +4849,6 @@ dependencies = [
  "wasm-bindgen",
 ]
 
-[[package]]
-name = "wee_alloc"
-version = "0.4.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e"
-dependencies = [
- "cfg-if 0.1.10",
- "libc",
- "memory_units",
- "winapi 0.3.9",
-]
-
 [[package]]
 name = "winapi"
 version = "0.2.8"
index 65f6f6db0b59843f2630c459c0d651391e79b549..901a8e4ac6c248cb69f1f65a9a429b72f2213073 100644 (file)
@@ -32,7 +32,6 @@ otter-base.version="=0.7.3"
 console_error_panic_hook="0.1"
 fehler="1"
 js-sys="0.3"
-wee_alloc="0.4"
 
 wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
 
index ddb946fe9ccef3c37891d0f8718b5630b492e43c..88dbd4b9bf0d007fb4c7b4efd07c82c2ef8c91c5 100644 (file)
@@ -216,6 +216,11 @@ pub fn setup(s: &str) -> JsString {
   format!("WASM {}", s).into()
 }
 
-//#[cfg(feature = "wee_alloc")]
-#[global_allocator]
-static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
+// wee-alloc has a null pointer deref here
+//   846 |         assert_local_cell_invariants(&(*current_free).header);
+// this is apparently known about
+//   https://githubplus.com/saethlin/miri-tools
+// and wee-alloc has not been updated in over a year.
+// This was saving us 7k in the output wasm file, out of 140k.
+//#[global_allocator]
+//static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;