Skip to content

Commit

Permalink
Use wee_alloc by default
Browse files Browse the repository at this point in the history
  • Loading branch information
s1na committed Apr 25, 2019
1 parent e47946c commit e0a54f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ repository = "https://github.com/ewasm/ewasm-rust-api"
description = "ewasm API for Rust"
edition = "2018"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wee_alloc = "0.4.4"

[features]
default = [ "std" ]
std = []
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
/// finish_data(&a.bytes);
/// }
/// ```
extern crate wee_alloc;

#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

mod native;
pub mod types;

Expand Down

0 comments on commit e0a54f0

Please sign in to comment.