Skip to content

the exported function __wbindgen_global_argument_ptr is required to generate bindings but it was not found in the wasm file #492

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

Closed
dignifiedquire opened this issue Jul 17, 2018 · 3 comments

Comments

@dignifiedquire
Copy link

dignifiedquire commented Jul 17, 2018

Hey, I was just updating the library from an older version and some of my code, but am running now into this:

cargo build --release --target wasm32-unknown-unknown

   Compiling cryptasm v0.1.0 (file:///Users/dignifiedquire/opensource/cryptasm)
    Finished release [optimized] target(s) in 0.71s

> [email protected] build:bindgen /Users/dignifiedquire/opensource/cryptasm
> wasm-bindgen target/wasm32-unknown-unknown/release/cryptasm.wasm --out-dir dist

error: failed to generate bindings for Rust export `encrypt`
	caused by: the exported function `__wbindgen_global_argument_ptr` is required to generate bindings but it was not found in the wasm file, perhaps the `std` feature of the `wasm-bindgen` crate needs to be enabled?

My versions are

> wasm-bindgen --version
wasm-bindgen 0.2.11 (9d27b44a4)
> rustc --version
rustc 1.29.0-nightly (1ecf6929d 2018-07-16)

any idea what I am doing wrong?

@dignifiedquire
Copy link
Author

The code this is trying to build is here: https://github.com/dignifiedquire/cryptasm/blob/update/src/lib.rs

@dignifiedquire
Copy link
Author

I suspect this is a regression on master, installing 0.2.11 from crates.io it compiles & builds fine now.

alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Jul 17, 2018
Make sure it's in the same module as our "link hack" to ensure it's always
linked in.

Closes rustwasm#492
@alexcrichton
Copy link
Contributor

Thanks for the report! This should be fixed in #494

alexcrichton added a commit that referenced this issue Jul 17, 2018
Make sure it's in the same module as our "link hack" to ensure it's always
linked in.

Closes #492
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

2 participants