rustwasm / wee_alloc

The Wasm-Enabled, Elfin Allocator
Mozilla Public License 2.0
665 stars 49 forks source link

Release new version to crates.io #78

Closed 12101111 closed 5 years ago

12101111 commented 5 years ago

Summary

Current version in crates.io have a link error while using the recent rust nightly.

https://github.com/rustwasm/wee_alloc/pull/56 fix this problem

Steps to Reproduce

lib.rs:

use wasm_bindgen::prelude::*;
use web_sys::console;
#[wasm_bindgen]
pub fn init() {
    console::log_1(&format!("it run").into());
}
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

Cargo.toml

[dependencies]
wasm-bindgen = "0.2"
wee_alloc = "0.4.2"

[dependencies.web-sys]
version = "0.3"
features = ["console"]

Actual Results

ERROR in ./pkg/wasm_test_bg.wasm
Module not found: Error: Can't resolve 'env' in '/mnt/g/project/wasm_test/pkg'
 @ ./pkg/wasm_test_bg.wasm
 @ ./pkg/wasm_test.js
 @ ./index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./index.js

in wasm file

  (import "env" "llvm.wasm.grow.memory.i32" (func $llvm.wasm.grow.memory.i32 (type $t2)))

Expected Results

Release a new version to crates.io

Robbepop commented 5 years ago

@12101111 the new version has been released https://crates.io/crates/wee_alloc

This issue can be closed as soon as #79 is merged.