-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
How to use per-project wasm-bindgen-cli
version?
#2702
Comments
That
error is unfortunate. Versions 2.78+ have a better error message than that. You're seeing that because the old project is <2.78. Sorry! The most popular way that people handle this right now is by using Some potential options for you:
|
Thank you for your reply, I will look into these solutions. |
I don't have much to add over what @chinedufn already said (thanks!), so I'm going to close. |
You can depend on wasm-bindgen-cli-support using regular Cargo dependencies and then write your own binary, like this: use wasm_bindgen_cli_support::Bindgen;
fn main()
{
Bindgen::new()
.input_path("my-wasm-file.wasm")
.generate("my-out-dir")
.unwrap();
} |
@chloekek Thank you very much, using |
Summary
I have two projects on my computer depending on WasmBindgen, but requiring different versions. How can I specify and pin the right
wasm-bindgen-cli
version on a per-project basis so it always matches the correspondingwasm-bindgen
lib version?Additional Details
My first
Cargo.toml
contains:My second
Cargo.toml
was freshly updated and contains:On my system I have a single global
wasm-bindgen
installation:I can't compile the recently updated project:
So I updated my globally installed
wasm-bindgen
CLI as documented:But now I can't build my older project:
I believe that those are some relevant Cargo issues, but I feel that there is no good solution at the moment. How do you handle this problem for your own projects?
The text was updated successfully, but these errors were encountered: