You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[INFO]: Checking for the Wasm target...
Error: wasm32-unknown-unknown target not found in sysroot: "D:\\msys64\\mingw64"
Used rustc from the following path: "D:\\msys64\\mingw64\\bin\\rustc.exe"
It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed m
anually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.
Caused by: wasm32-unknown-unknown target not found in sysroot: "D:\\msys64\\mingw64"
Used rustc from the following path: "D:\\msys64\\mingw64\\bin\\rustc.exe"
It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed m
anually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.
I followed the docs and downloaded the package from here, and extracted to the corrent path.
And wasm-pack build says:
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
Compiling proc-macro2 v1.0.69
Compiling unicode-ident v1.0.12
Compiling wasm-bindgen-shared v0.2.87
Compiling log v0.4.20
Compiling bumpalo v3.14.0
Compiling once_cell v1.18.0
Compiling wasm-bindgen v0.2.87
Compiling cfg-if v1.0.0
error[E0514]: found crate `core` compiled by an incompatible version of rustc
|
= note: the following crate versions were found:
crate `core` compiled by rustc 1.73.0 (cc66ad468 2023-10-03): \\?\D:\msys64\mingw64\lib\rustlib\wasm32-unknown
-unknown\lib\libcore-27002f4433b346f4.rlib
= help: please recompile that crate using this compiler (rustc 1.73.0 (cc66ad468 2023-10-03) (Rev1, Built by MSYS2 pro
ject)) (consider running `cargo clean` first)
error[E0514]: found crate `compiler_builtins` compiled by an incompatible version of rustc
|
= note: the following crate versions were found:
crate `compiler_builtins` compiled by rustc 1.73.0 (cc66ad468 2023-10-03): \\?\D:\msys64\mingw64\lib\rustlib\w
asm32-unknown-unknown\lib\libcompiler_builtins-3caab20d5176b051.rlib
= help: please recompile that crate using this compiler (rustc 1.73.0 (cc66ad468 2023-10-03) (Rev1, Built by MSYS2 pro
ject)) (consider running `cargo clean` first)
For more information about this error, try `rustc --explain E0514`.
error: could not compile `cfg-if` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
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 code: 101
full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to make a project using rust and wasm-pack, but failed to run
wasm-pack build
.Versions:
OS: Windows 10 x64
Msys2: Updated 2023-10-13 with pacman
Env: MINGW64
wasm-pack: 0.12.1
cargo: 1.73.0
rustc: 1.73.0 (cc66ad468 2023-10-03) (Rev1, Built by MSYS2 project)
Steps to reproduce:
pacman -S mingw-w64-x86_64-rust pacman -S mingw-w64-x86_64-cargo-generate pacman -S mingw-w64-x86_64-wasm-pack pacman -S mingw-w64-x86_64-cargo-generate cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project cd my-project wasm-pack build
And it says:
I followed the docs and downloaded the package from here, and extracted to the corrent path.
And
wasm-pack build
says:Beta Was this translation helpful? Give feedback.
All reactions