Wasmer: Apple Silicon build can't be downloaded

Created on 14 Nov 2020  路  9Comments  路  Source: wasmerio/wasmer

Describe the bug

When attempting to download wasmer on Apple Silicon hardware the installation scripts fails with error The system architecture (arm64) is not supported by this installation script.

Steps to reproduce

Run the installation script on Apple Silicon hardware: curl https://get.wasmer.io -sSfL | sh

Expected behavior

A build of Wasmer appropriate for Apple Silicon is downloaded.

Actual behavior

The build script fails.

Additional context

According to https://github.com/wasmerio/wasmer/issues/1495 Wasmer should support ARM64 and Apple Silicon, but apparently it's either the installation script doesn't support the appropriate build, or the build itself is not available?

馃悶 bug

Most helpful comment

We just got an Apple Silicon laptop in our hands (it's amazing how fast it is!), and we got the wast tests working.
The other issues should be solvable very soon. Expect to have a Wasmer native binary for Apple Silicon in the next day or so :)

Related PR: https://github.com/wasmerio/wasmer/pull/1831

All 9 comments

Thanks for opening the issue!
ARM should be fully supported, we just need to build the arm64 Darwin binary in the CI and add it into the next release.

When running cargo test in the root directory of Wasmer it fails with this error on Apple Silicon:

error: failed to run custom build command for `bitflags v1.2.1`

Caused by:
  process didn't exit successfully: `~/Documents/wasmer/target/debug/build/bitflags-713282f14ec40458/build-script-build` (signal: 9, SIGKILL: kill)

cargo test -v fails with

error: failed to run custom build command for `proc-macro2 v1.0.24`

Caused by:
  process didn't exit successfully: `~/Documents/wasmer/target/debug/build/proc-macro2-409c2ef23a214a50/build-script-build` (signal: 9, SIGKILL: kill)

We are waiting for the new Apple-Silicon based laptops to arrive, so we can start testing Wasmer on those!
We will post here the progress :)

We just got an Apple Silicon laptop in our hands (it's amazing how fast it is!), and we got the wast tests working.
The other issues should be solvable very soon. Expect to have a Wasmer native binary for Apple Silicon in the next day or so :)

Related PR: https://github.com/wasmerio/wasmer/pull/1831

Update: we got all tests working, including WASI 馃帀

Some nits:

  • Apple Silicon ABI differs a bit from the common ARM ABI, so to get it running we had to bypass incorrect Cranelift registers for Apple's aarch64 by leveraging on Dynamic Functions rather than Native ones
  • The Native engine is not yet supported because of the object crate doesn't yet fully support

LLVM should work as well, but I'm waiting for brew to fully support Apple Silicon to make it work!

We just merged support for Apple Silicon in #1831.

Wasmer now should work in both cases: through the CLI and also embedded in other programming languages.

As a way to start using the Wasmer binary, I've uploaded temporarily a distribution of Wasmer for darwin-arm64 in the alpha5 release. This way you can use the normal installer to install Wasmer in your system:

curl https://get.wasmer.io -sSfL | sh

However, we will officially publish it on the next release :)

Lovely, thanks for the updates, this is great!

@syrusakbary just one more question, is there any estimate for when this new build will be available via Homebrew?

It depends on rust/cargo.
So until brew support them we can鈥檛 really do that much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geloizi picture geloizi  路  4Comments

robinvanemden picture robinvanemden  路  4Comments

robinvanemden picture robinvanemden  路  5Comments

leonardas103 picture leonardas103  路  5Comments

aergonaut picture aergonaut  路  3Comments