-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Exported functions no longer visible in JS #563
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
Comments
Thanks for the report! @viktorku what version of the |
It seems it's resolved in 0.2.15 ;) $ cargo update
Updating registry `https://github.com/rust-lang/crates.io-index`
Updating wasm-bindgen v0.2.13 -> v0.2.15
Updating wasm-bindgen-backend v0.2.13 -> v0.2.15
Updating wasm-bindgen-macro v0.2.13 -> v0.2.15
Updating wasm-bindgen-shared v0.2.13 -> v0.2.15
$ ./build
Downloading wasm-bindgen v0.2.15
Downloading wasm-bindgen-macro v0.2.15
Downloading wasm-bindgen-shared v0.2.15
Downloading wasm-bindgen-backend v0.2.15
Compiling wasm-bindgen-shared v0.2.15
Compiling wasm-bindgen-backend v0.2.15
Compiling wasm-bindgen-macro v0.2.15
Compiling wasm-bindgen v0.2.15
Compiling kunovski v0.1.0 (file:///Users/viktor/projects/kunovski)
Finished release [optimized] target(s) in 19.13s If I downgrade to 0.2.14: $ cargo update -p wasm-bindgen --precise 0.2.14
Updating registry `https://github.com/rust-lang/crates.io-index`
Updating wasm-bindgen v0.2.15 -> v0.2.14
Updating wasm-bindgen-backend v0.2.15 -> v0.2.14
Updating wasm-bindgen-macro v0.2.15 -> v0.2.14
Updating wasm-bindgen-shared v0.2.15 -> v0.2.14
$ ./build
Compiling wasm-bindgen-shared v0.2.14
Compiling wasm-bindgen-backend v0.2.14
Compiling wasm-bindgen-macro v0.2.14
Compiling wasm-bindgen v0.2.14
Compiling kunovski v0.1.0 (file:///Users/viktor/projects/kunovski)
Finished release [optimized] target(s) in 18.79s My |
This probably deserves a separate issue, but when I try to upgrade
|
I haven't looked at the code, but e.g. it could be trying to compile the cli on wasm32-unknown-unknown when it should be on host platform. |
Ok thanks for the info @viktorku! In that case I think I'm going to close this. I also think for that build failure @derekdreery hit the nail on the head, you're likely running into rust-lang/cargo#2507 where |
Hi there!
I think I've hit a regression in the latest 0.2.14 release as I basically can't call any exported function from JS into Rust anymore.
Here's the module on 0.2.13:
notice my
init
andstart
export and all the boilerplate DOM API imports I've defined.and here it is on 0.2.14:
The code is exactly the same, and pretty much as in the basic tutorial :/
Is there something I need to do to make this work?
Thanks for all the great work BTW!
[EDIT]: Here's the code: https://github.com/viktorku/kunovski/blob/master/src/lib.rs
The text was updated successfully, but these errors were encountered: