I'm trying to get a .wasm file via RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown
but get the error:
error[E0463]: can't find crate for `std`
When i type rustup target add wasm32-unknown-unknown
i get:
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
I installed Rust and Rustup separate via chocolatey.
rustc
version is rustc 1.60.0-nightly (5e57faa78 2022-01-19)
You need to add the wasm32-unknown-unknown target for the nightly toolchain if that's what you are using:
rustup target add --toolchain nightly wasm32-unknown-unknown