Description
Describe the Bug
I just stumbled upon the issue that the wasm-bindgen does not seem to be working with the latest nightly release if you pass rustc compiler flags for threading, e.g. rustflags=["-C", "target-feature=+atomics,+bulk-memory"]
.
This results in an obscure error that says
wasm-bindgen is currently incompatible with modules that already have a start function
I have found out that using an older nightly version fixes the issue. In my case I had to use nightly-2020-05-15
as new versions always told me that rustfmt
for target 'x86_64-apple-darwin' is unavailable.
Steps to Reproduce
- Create new project with
wasm-pack new test
- Run
wasm-pack build
withRUSTFLAGS='-C target-feature=+atomics,+bulk-memory'
Expected Behavior
I am not sure if this is a bug with the rust compiler itself or if it's an issue with wasm-bindgen, but I'd say that this should work very similar to older nightly versions such as nightly-2020-05-15
.