Skip to content

Commit 61a5295

Browse files
committed
wee alloc as feature
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
1 parent 0441a6d commit 61a5295

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ edition = "2018"
1111
[dependencies]
1212
hashbrown = { version = "0.8", default-features = false, features = ["ahash", "inline-more"] }
1313
log = "0.4"
14+
wee_alloc = { version = "0.4", optional = true }
1415

15-
[target.'cfg(target_arch = "wasm32")'.dependencies.wee_alloc]
16-
version = "0.4"
16+
[features]
17+
wee_alloc = ["wee_alloc"]
1718

1819
[dev-dependencies]
1920
chrono = "0.4"

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub mod hostcalls;
1616
pub mod traits;
1717
pub mod types;
1818

19-
#[cfg(target_arch = "wasm32")]
19+
#[cfg(feature = "wee_alloc")]
2020
mod allocator;
2121
mod dispatcher;
2222
mod logger;

0 commit comments

Comments
 (0)