Stream: general

Topic: Popular WASI runtimes w/ a CLI for env vars and dir mapping?


view this post on Zulip Brett Cannon (Sep 29 2023 at 00:11):

I realize this might a slightly controversial ask, but I'm trying to get a list of popular WASI runtimes to compare their CLIs. I'm trying to see if there's any commonality in how they specify environment variables and host:local directory mappings. I've already checked wasmtime, wasmedge, and wazero out (wasmtime uses --mapdir, the other two use --dir; all three use --env). WAMR/iwasm doesn't seem to suport mapping directories to a different location within the runtime.

view this post on Zulip Diego Antonio Rosario Palomino (Sep 29 2023 at 06:13):

Most wasm runtimes are embedded in Javascript. You could try like the one in chrome

view this post on Zulip Ramon Klass (Sep 29 2023 at 10:30):

I think he is currently only investigating WASI (not WASM) runtimes that can run server-side WASI with virtualization, the browser wasm is boring, we all know what it supports and what it doesn't ;)

view this post on Zulip Ralph (Sep 29 2023 at 10:46):

wasmtime, wasm3, wamr, wazero, wasmedge, wasmer, node, deno? are the ones off the top of my head, each one doing some "version" of wasi - up to you to explore to what extent.

view this post on Zulip Ralph (Sep 29 2023 at 10:47):

if you want more, I can find them, because there are a lot of experimental and academic ones as well.

view this post on Zulip Ralph (Sep 29 2023 at 11:10):

WaVe, Wizard, F<number goes here>, ....

view this post on Zulip Milan (Sep 29 2023 at 11:47):

For browser wasi there is the runno.dev
JS API: https://runno.dev/docs/wasi/#md:quickstart
And declarative web component API: https://runno.dev/articles/wasi-web-component

Make your code samples Runno.
Make your code samples Runno.

view this post on Zulip Milan (Sep 29 2023 at 11:50):

wasi-virt could also be in the list of clis setting up mappings for wasi apis

view this post on Zulip Brett Cannon (Sep 30 2023 at 00:49):

Ramon Klass said:

I think he is currently only investigating WASI (not WASM) runtimes that can run server-side WASI with virtualization

Correct! This is specifically about seeing what it would take to support various WASI runtimes for building CPython instead of hard-coding wasmtime (as I'm doing right now out of laziness).

view this post on Zulip Ralph (Oct 02 2023 at 10:18):

wasmtime is about to support preview 2 wasi, jco will soon, wamr will take a bit more, outside of that I have no knowledge at this time.

view this post on Zulip Ralph (Oct 02 2023 at 12:39):

I think possibly more interesting is the ability for a runtime that supports preview 2 to also run preview 1, which is something that the ecosystem is making possible.....

view this post on Zulip Brett Cannon (Oct 05 2023 at 00:41):

I looked at wasmtime, wazero, wasmer, wasmedge, wasm3, and WAMR/iwasm. The last two don't have all the CLI flags I was looking for. For for the 4 that did, they all support --env, but vary on how to map a guest directory to a host directory (there's --mapdir, --dir via host:guest format, and --mount among them).

view this post on Zulip Ralph (Oct 05 2023 at 08:41):

right, I'll reach out to the wamr team about these flags.

view this post on Zulip Brett Cannon (Oct 19 2023 at 18:46):

FYI wasmtime 14 is switching to --dir according to https://github.com/bytecodealliance/wasmtime/pull/6925, although they are using :: as the path separator while wasmedge uses :

This commit follows through on discussion from #6741 to redesign the flags that the wasmtime binary accepts on the CLI. Almost all flags have been renamed/moved and will require callers to update. ...

view this post on Zulip Alex Crichton (Oct 20 2023 at 00:14):

I've opened an issue for this for what syntax to pick for Wasmtime

This issue is inspired by discussion on #7301 and Zulip. To summarize a bit, the --dir syntax is inconsistent between Wasmtime and other runtimes, and a notable inconsistency of Wasmtime is the usa...

Last updated: Dec 23 2024 at 12:05 UTC