Skip to content

Commit 9cc0d51

Browse files
authored
Merge pull request #47 from ewasm/wee-alloc
Use wee_alloc by default
2 parents e47946c + b2b2fcc commit 9cc0d51

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ repository = "https://github.com/ewasm/ewasm-rust-api"
77
description = "ewasm API for Rust"
88
edition = "2018"
99

10+
[dependencies]
11+
wee_alloc = "0.4.4"
12+
1013
[features]
1114
default = [ "std" ]
1215
std = []

src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
/// finish_data(&a.bytes);
1919
/// }
2020
/// ```
21+
extern crate wee_alloc;
22+
23+
#[global_allocator]
24+
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
25+
2126
mod native;
2227
pub mod types;
2328

0 commit comments

Comments
 (0)