Stream: wasmtime

Topic: flag design


view this post on Zulip Andrew Brown (Apr 28 2021 at 15:48):

@Till Schneidereit, @Alex Crichton: I started adding an --experimental-wasi-modules=... flag and now am wondering it if should be more general. I could write this so that the user can pick any set of WASI modules they want to have available, e.g., --wasi-modules=wasi-fs,wasi-clock. In that case, the default would be to include the WASI common modules (not wasi-nn, wasi-crypto) if the user doesn't specify which modules to use

view this post on Zulip Andrew Brown (Apr 28 2021 at 15:49):

But if the intent of the flag was to just highlight the experimental nature of certain WASI modules, then I can keep the original name, --experimental-wasi-modules, and only allow setting wasi-nn and wasi-crypto.

view this post on Zulip Andrew Brown (Apr 28 2021 at 15:50):

Thoughts?

view this post on Zulip Till Schneidereit (Apr 28 2021 at 15:53):

oh, that's actually a very good point! I like the idea of using this not just for experimental modules, but more generally. @Dan Gohman, I'm curious to hear what you think about this?

view this post on Zulip Dan Gohman (Apr 28 2021 at 15:54):

I also like the idea of having an easy way on the command line to specify which WASI modules to make available.

view this post on Zulip Andrew Brown (Apr 28 2021 at 15:54):

So maybe I'll do something in the CLI help to indicate which WASI modules are more experimental?

view this post on Zulip Dan Gohman (Apr 28 2021 at 15:55):

Maybe instead of --experimental-wasi-modules, it's just called --wasi-modules=all (default, not experimental things) and --wasi-modules=all-experimental (the whole airship)

view this post on Zulip Till Schneidereit (Apr 28 2021 at 16:02):

yeah, I like that. Perhaps s/all/stable/ or all-stable? But now we're solidly in bikeshedding territory, which seems good :wink:

view this post on Zulip Dan Gohman (Apr 28 2021 at 16:20):

Yeah, or maybe s/all/default/? Happy to subject this to bikeshedding :-)

view this post on Zulip Andrew Brown (Apr 28 2021 at 17:17):

Take a look at https://github.com/bytecodealliance/wasmtime/pull/2859/commits/bf43539bac237aafbd26c67faa9b7da19d14ebe1; I tried to match what is done in --wasm-features and that uses all so I went with --wasi-modules=all and --wasi-modules=all-experimental. I'm fine to change it to stable or default or whatever just let me know...

This change makes the wasi-nn Cargo feature a default feature. Previously, a wasi-nn user would have to build a separate Wasmtime binary (e.g. cargo build --features wasi-nn ...) to use wasi-nn and...

view this post on Zulip Andrew Brown (Apr 28 2021 at 17:17):

I can also pull that commit out into a separate PR if we would like to review that separately from the wasi-nn "turning on" PR

view this post on Zulip Till Schneidereit (Apr 28 2021 at 18:11):

ah, I hadn't been aware of this precedent. I agree that it makes sense to follow that convention, then

view this post on Zulip Andrew Brown (Apr 28 2021 at 22:43):

I think https://github.com/bytecodealliance/wasmtime/pull/2859 is ready to review in a few of you could take a look!

This change makes the wasi-nn Cargo feature a default feature. Previously, a wasi-nn user would have to build a separate Wasmtime binary (e.g. cargo build --features wasi-nn ...) to use wasi-nn and...

Last updated: Dec 23 2024 at 13:07 UTC