Skip to content

Commit

Permalink
wee alloc as feature
Browse files Browse the repository at this point in the history
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
  • Loading branch information
yuval-k committed Nov 3, 2020
1 parent 0441a6d commit 61a5295
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ edition = "2018"
[dependencies]
hashbrown = { version = "0.8", default-features = false, features = ["ahash", "inline-more"] }
log = "0.4"
wee_alloc = { version = "0.4", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies.wee_alloc]
version = "0.4"
[features]
wee_alloc = ["wee_alloc"]

[dev-dependencies]
chrono = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub mod hostcalls;
pub mod traits;
pub mod types;

#[cfg(target_arch = "wasm32")]
#[cfg(feature = "wee_alloc")]
mod allocator;
mod dispatcher;
mod logger;
Expand Down

0 comments on commit 61a5295

Please sign in to comment.