DEV Community

Cover image for wasm32-unknown-unknown target may not be installed (macOS M1)
Evgenii
Evgenii

Posted on

wasm32-unknown-unknown target may not be installed (macOS M1)

If you go in the loop by executing $ cargo build --release --target wasm32-unknown-unknown --lib, that means you have installed Rust on your MacBook M1 using brew installer

My setup at the time when I caught this problem was:

  • macOS (M1)
  • Rust installed by brew install rust
  • $ rustc --print sysroot
    **/opt/homebrew/Cellar/rust/1.64.0**

  • as you can see all attempt to execute wasm boundaries command, bring me to the circle of non-installed wasm32 target (which was installed)

Image description


Solution #1: Install using https://www.rust-lang.org/tools/install
Install rustup on top already installed library (by brew) does not fix anything.


Solution #2: Uninstall existing rust version

  • $ brew uninstall rust
  • keep only one default .rustup/toolchains/stable-aarch64-apple-darwin

Next: Install Rust from correct source


Problem solved! 🎉

p.s. check out this course where I got this issue (Free)

my project: https://github.com/Ebazhanov/cosmwasm-blockchain-smart-contract-example

Top comments (0)