Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish a wasm-bindgen-test for use as an internal detail within wasm-pack test #615

Closed
fitzgen opened this issue Aug 2, 2018 · 8 comments

Comments

@fitzgen
Copy link
Member

fitzgen commented Aug 2, 2018

As discussed in today's WG meeting, we are aiming for publishing an initial release of the wasm-bindgen-test crate to be used as an unstable implementation detail within a wasm-pack test command for the Rust 2018 Release Candidate milestone. That's 6 weeks from now: 2018-09-13.

What needs to be done before we publish wasm-bindgen-test for use by wasm-pack test?

+cc @alexcrichton @ashleygwilliams

@fitzgen
Copy link
Member Author

fitzgen commented Aug 2, 2018

And here is the wasm-pack half: rustwasm/wasm-pack#248

@gnzlbg
Copy link
Contributor

gnzlbg commented Aug 8, 2018

So I followed the steps here https://github.com/rustwasm/wasm-bindgen/blob/master/crates/test/README.md

And got the following error: https://gist.github.com/gnzlbg/bce2a1020dde236e28d466311e4697c8

  = note: rust-lld: error: duplicate symbol: __wbindgen_global_argument_ptr
          >>> defined in /wasm-test/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-93b4abe9cd9b46f4.rlib(wasm_bindgen-93b4abe9cd9b46f4.wasm_bindgen13.rcgu.o)
          >>> defined in /wasm-test/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-1267805b2935233b.rlib(wasm_bindgen-1267805b2935233b.wasm_bindgen4.rcgu.o)
          
          rust-lld: error: duplicate symbol: __wbindgen_malloc
          >>> defined in /wasm-test/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-93b4abe9cd9b46f4.rlib(wasm_bindgen-93b4abe9cd9b46f4.wasm_bindgen13.rcgu.o)
          >>> defined in /wasm-test/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-1267805b2935233b.rlib(wasm_bindgen-1267805b2935233b.wasm_bindgen4.rcgu.o)
          
          rust-lld: error: duplicate symbol: __wbindgen_free
          >>> defined in /wasm-test/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-93b4abe9cd9b46f4.rlib(wasm_bindgen-93b4abe9cd9b46f4.wasm_bindgen13.rcgu.o)
          >>> defined in /wasm-test/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-1267805b2935233b.rlib(wasm_bindgen-1267805b2935233b.wasm_bindgen4.rcgu.o)

System is MacOSX 10.13.6
I installed node via homebrew: brew install node, which installed the version 10.8.0

My Cargo.toml looks like:

[package]
name = "wasm-test"
version = "0.1.0"
authors = ["..."]

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = { git = 'https://github.com/rustwasm/wasm-bindgen' }

and in my wasm-test binary crate, I have a .cargo/config that looks like:

[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'

My src/lib.rs is just an #![no_std] (nothing else), and the tests/test.rs is the one in the Readme.

@alexcrichton
Copy link
Contributor

Looks like @gnzlbg's issue was #667, thanks for the PR!

@gnzlbg
Copy link
Contributor

gnzlbg commented Aug 9, 2018

Yes, @fitzgen was very helpful on IRC, thanks!

@gnzlbg
Copy link
Contributor

gnzlbg commented Aug 13, 2018

could we do a wasm-bindgen minor release to avoid using this from git ?

@fitzgen
Copy link
Member Author

fitzgen commented Aug 13, 2018

Yes, hopefully today or tomorrow.

@fitzgen
Copy link
Member Author

fitzgen commented Aug 13, 2018

0.2.16 is published!

@fitzgen
Copy link
Member Author

fitzgen commented Aug 13, 2018

I think we can close this issue -- I didn't realize that we had already published wasm-bindgen-test when I filed this issue. I think all the remaining work is needed in wasm-pack and in documentation.

@fitzgen fitzgen closed this as completed Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants