Published on

NEAR - Error: Unsupported platform: Darwin arm64

Today I learned (TIL) how to fixed issue about NEAR VM unsupported on Apple M1.

I just started to learn NEAR by forked example project guest-book, and trying to build a Rust smart contract on my Macbook M1 Pro (arm64), I get an unsupported platform error.

to fixed the issue, just force Rust to compile to x86 with rustup command:

rustup target add x86_64-apple-darwin
rustup default stable-x86_64-apple-darwin

To see a list of available targets:

rustup target list

Reference

Authors