DEV Community

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

Posted on

2

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

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more