From 46df0cb9ab7aa7f17e8ce07afda4ec64feb835e6 Mon Sep 17 00:00:00 2001 From: Stefnotch Date: Sat, 9 Mar 2024 18:29:15 +0100 Subject: [PATCH] Remove wee-alloc --- Cargo.toml | 6 ------ src/lib.rs | 6 ------ 2 files changed, 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ccf060a..d67eff6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,12 +36,6 @@ indexmap = "1.9.3" # code size when deploying. console_error_panic_hook = { version = "0.1.7", 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. -# -# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now. -wee_alloc = { version = "0.4.5", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] console_log = "1.0.0" diff --git a/src/lib.rs b/src/lib.rs index 0575f8d..af9080c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,12 +14,6 @@ use std::mem::{size_of, take}; use std::sync::atomic::{AtomicBool, Ordering}; 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; - #[cfg(target_arch = "wasm32")] #[derive(Clone)] struct SuccessCallback(Option);