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

error: the -Z flag is only accepted on the nightly channel of Cargo, but this is the stable channel #1456

Open
kjxbyz opened this issue Dec 15, 2024 · 0 comments

Comments

@kjxbyz
Copy link

kjxbyz commented Dec 15, 2024

🐛 Bug description

ying@Kimmys-iMac my_app % wasm-pack build -t no-modules -d /Users/ying/my_app/web/pkg --no-typescript --out-name rust_lib_my_app rust -- -Z build-std=std,panic_abort
[INFO]: 🎯  Checking for the Wasm target...
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: installing component 'rust-std' for 'wasm32-unknown-unknown'
 18.9 MiB /  18.9 MiB (100 %)  15.0 MiB/s in  1s ETA:  0s
[INFO]: 🌀  Compiling to Wasm...
error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel
See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "rust" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown" "-Z" "build-std=std,panic_abort"

🤔 Expected Behavior

What should have happened?

👟 Steps to reproduce

  1. git clone https://github.com/kjxbyz/my_app && cd my_app
  2. wasm-pack build -t no-modules -d ./web/pkg --no-typescript --out-name rust_lib_my_app rust -- -Z build-std=std,panic_abort

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version:0.13.1
rustc version:1.83.0

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

1 participant