From 5f4f1d791db67b0b5bc5f3100f51e9736bc23ee5 Mon Sep 17 00:00:00 2001 From: njelich <12912633+njelich@users.noreply.github.com> Date: Sun, 25 Feb 2024 19:58:47 +0100 Subject: [PATCH] fix: remove deprecated wee_alloc --- near-sdk/Cargo.toml | 4 +--- near-sdk/src/lib.rs | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/near-sdk/Cargo.toml b/near-sdk/Cargo.toml index bdcacd058..11549f42b 100644 --- a/near-sdk/Cargo.toml +++ b/near-sdk/Cargo.toml @@ -34,8 +34,6 @@ near-account-id = { version="1.0.0", features = ["serde", "borsh"] } near-gas = { version = "0.2.3", features = ["serde", "borsh"] } near-token = { version = "0.2.0", features = ["serde", "borsh"] } -[target.'cfg(target_arch = "wasm32")'.dependencies] -wee_alloc = { version = "0.4.5", default-features = false, optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] schemars = { version = "0.8.8", optional = true } @@ -63,7 +61,7 @@ near-abi = { version = "0.4.0", features = ["__chunked-entries"] } symbolic-debuginfo = "12" [features] -default = ["wee_alloc"] +default = [] expensive-debug = [] unstable = [] legacy = [] diff --git a/near-sdk/src/lib.rs b/near-sdk/src/lib.rs index 2a97f93ce..14caf8b3f 100644 --- a/near-sdk/src/lib.rs +++ b/near-sdk/src/lib.rs @@ -52,11 +52,6 @@ pub use crate::utils::*; #[cfg(all(feature = "unit-testing", not(target_arch = "wasm32")))] pub mod test_utils; -// Set up global allocator by default if custom-allocator feature is not set in wasm32 architecture. -#[cfg(all(feature = "wee_alloc", target_arch = "wasm32"))] -#[global_allocator] -static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; - // Exporting common crates pub use base64;