Stream: general

Topic: wasmtime motivation vs WAMR


view this post on Zulip Julien Cretin (ia0) (Apr 20 2022 at 11:52):

Hi all, I tried to find in the github documentation the reason wasmtime was developed compared to using WAMR. Both seem to be developed by bytecodealliance, so I was expecting some documentation to help one choose between both. The only thing I can think of is that wasmtime makes it safer to use from Rust and should thus be preferred when embedding in Rust. But that's just a guess. Is there an official position regarding how to decide between wasmtime and WAMR? (e.g. regarding running on micro-controllers, APIs, etc)

view this post on Zulip Alexandru Ene (Apr 20 2022 at 13:11):

As I remember from last looking at it, WasmTime is AOT-only, so that may be a blocker for many of these IOT-like devices. It doesn't have an "interpreted" mode. You also need to be able to compile rust to your target architecture that may or may not be an issue depending on what's targeted. WAMR is in C, albeit a relatively newer C standard (C 11) but still probably more friendly if we're talking about these IOT-type of targets.

view this post on Zulip Anton Kirilov (Apr 20 2022 at 14:51):

Wasmtime can operate as both an AOT and a JIT compiling runtime, but you are right that there is no interpreter.

view this post on Zulip Julien Cretin (ia0) (Apr 20 2022 at 15:22):

I see, but those are suggesting that WAMR should be preferred over Wasmtime. What I'm curious about is why develop Wasmtime when WAMR already exists? Is it only to have a memory-safe alternative? Or are there some technical reasons too?

view this post on Zulip Alexandru Ene (Apr 20 2022 at 15:28):

It's hard to say a generic recommendation for what should be preferred. It depends on the systems targeted and use-cases.
For example, for wasmtime, there are some advantages when integrating with existing rust projects, in addition to the features it has (JIT/AOT).
WAMR has advantages when it is targeted basically at a different set of devices, more geared towards IOT-space or places where you already have a C++ project where it may be easier to integrate with this VM

view this post on Zulip Alexandru Ene (Apr 20 2022 at 15:30):

What we did, is we have an integration with both :smile:. And for a long time we used Wasmtime for debugging capabilities, and WAMR to deploy on devices. The APIs are quite similar so integrating with both wasn't that much of an effort.

view this post on Zulip Julien Cretin (ia0) (Apr 20 2022 at 15:38):

Interesting, thanks for the input!


Last updated: Oct 23 2024 at 20:03 UTC