From b2b2fcc3f2647041ef7b80c4fc5e0cdc64df55e5 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 25 Apr 2019 17:42:03 +0200 Subject: [PATCH] Use wee_alloc by default --- Cargo.toml | 3 +++ src/lib.rs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 636a160..e80b73c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,9 @@ repository = "https://github.com/ewasm/ewasm-rust-api" description = "ewasm API for Rust" edition = "2018" +[dependencies] +wee_alloc = "0.4.4" + [features] default = [ "std" ] std = [] diff --git a/src/lib.rs b/src/lib.rs index 1dbf645..3420c77 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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;