Stream: git-wasmtime

Topic: wasmtime / Issue #339 Support arm (non tier 1) platforms


view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 00:09):

brooksmtownsend commented on Issue #339:

A project that I contribute to has a dependency on the rust crate wasmtime = "0.15.0", and running cargo build on a Raspberry Pi 3B using Ubuntu 20.04 LTS armv7l results in the following error:

   Compiling wasmtime-runtime v0.15.0
error: unsupported platform
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.15.0/src/traphandlers.rs:169:21
    |
169 |                     compile_error!("unsupported platform");
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.15.0/src/traphandlers.rs:156:52
    |
156 |         unsafe fn get_pc(cx: *mut libc::c_void) -> *const u8 {
    |                   ------                           ^^^^^^^^^ expected *-ptr, found `()`
    |                   |
    |                   implicitly returns `()` as its body has no tail or `return` expression
...
169 |                     compile_error!("unsupported platform");
    |                                                           - help: consider removing this semicolon
    |
    = note: expected raw pointer `*const u8`
                 found unit type `()`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `wasmtime-runtime`.

To learn more, run the command again with --verbose.

I understand that wasmtime does not support arm, just thought I'd contribute and say that others are still watching :big_smile:

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 01:58):

jlb6740 commented on Issue #339:

Hi @brooksmtownsend have you seen this https://github.com/bytecodealliance/wasmtime/pull/1494? Perhaps just a dependency update?

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 02:00):

jlb6740 deleted a comment on Issue #339:

Hi @brooksmtownsend have you seen this https://github.com/bytecodealliance/wasmtime/pull/1494? Perhaps just a dependency update?

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 02:01):

jlb6740 commented on Issue #339:

Hi @brooksmtownsend have you seen this #1494? Does this platform support Arm64?

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 06:18):

cfallin commented on Issue #339:

The RPi3 does have a 64-bit CPU, but I think most distros (at least the default Raspbian, and it looks like Ubuntu install in the logs above too) run a 32-bit kernel and userland. Unfortunately we only support ARM64 (which would require a 64-bit userland) right now. @brooksmtownsend, I've used wasmtime successfully on a Gentoo 64-bit install on a RPi4, FWIW, but I know switching distro/install is quite a hassle.

ARM32 support may come at some point in the future, but I'm not sure what our architecture support roadmap looks like so I can't make any promises, sorry! If anyone is interested in working on this, I'd be happy to provide guidance as best as I can.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 09:32):

brooksmtownsend commented on Issue #339:

@cfallin @jlb6740 great callout and this was all done on a fresh install of, unfortunately, the 32-bit server OS. I'll try out switching to the 64-bit version of Ubuntu (I'm not dedicated to Ubuntu, but figured I'll stick with changing one thing at a time) and see how that goes. Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 09:42):

ebeasant-arm commented on Issue #339:

If you can get it installed, Ubuntu 64-bit is well worth the effort: With the recent upgrade of the Pi Imager, its not much harder than putting Rasbian on it from scratch :-) There's been a huge amount of work on Cranelift/wasmtime very recently to support aarch64, which is now maturing nicely, and being used in anger. Keep up the good work!

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 09:43):

brooksmtownsend commented on Issue #339:

Awesome! Looking forward to getting it, I actually didn't mean to install the 32-bit version in the first place

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 09:56):

tschneidereit commented on Issue #339:

@brooksmtownsend we'd love to hear how things are going, so it'd be great if you could report back here. Do note that #1494 just landed, so ARM64 support is quite new, which might mean running into early-adopter issues. Which mostly means that hearing how things are going would be even more appreciated :D

view this post on Zulip Wasmtime GitHub notifications bot (May 16 2020 at 15:12):

brooksmtownsend commented on Issue #339:

@tschneidereit i tried building with the aarch64 version of Ubuntu 20.04, unfortunately I ran into the same issue. This is with wasmtime-runtime v0.15.0, is that too early of a version?

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2020 at 19:35):

tschneidereit commented on Issue #339:

@brooksmtownsend thank you for reporting this! I think v0.15.0 might indeed be too old: I think the new backend hadn't landed by then, and we certainly didn't do aarch64 builds in CI. We do do that by now, see the dev and v0.16.0 releases.

However, the cross-compilation process isn't documented (at least that I could find). I just filed #1720 to rectify that. Here's the patch that added aarch64 builds to CI, in case you're interested.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2021 at 18:20):

bjorn3 commented on Issue #339:

The new backend framework has a working AArch64 backend.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2021 at 18:42):

cfallin closed Issue #339:

The wasi story is really exciting in the idea of showing we can run the same code on multi platforms and architectures so I went to do that, and in compiling for arm I found that only tier 1 basically x86 platforms are supported currently.

/home/pi/wasmtime/wasmtime-jit/src/link.rs:(.text._ZN12wasmtime_jit4link8relocate17h8a250ae005184b62E+0x680): undefined reference to `__rust_probestack'
collect2: error: ld returned 1 exit status

Found this in probestack so it seems like an upstream problem

//! Finally it's worth noting that at the time of this writing LLVM only has
//! support for stack probes on x86 and x86_64. There's no support for stack
//! probes on any other architecture like ARM or PowerPC64. LLVM I'm sure would
//! be more than welcome to accept such a change!

And found these
https://github.com/rust-lang/rust/issues/43241
https://github.com/rust-lang/rust/issues/49355


Last updated: Nov 22 2024 at 16:03 UTC