Stream: wasmtime

Topic: Which WASI version(preview) to use?


view this post on Zulip anb (Aug 22 2024 at 22:15):

Hi I'm going to work on a WASI project with rust and wasmtime. The project currently depends on wasmtime-9, wasi_common(preview 1) and bunch of other "old" stuff, I wonder should I upgraded it to wasmtime-24. My concern is that the preview2 doesn't seem to be supported yet as of rust-1.80, and does it make sense to use wasmtime-24::preview1 instead? Thanks.

view this post on Zulip Ramon Klass (Aug 22 2024 at 23:39):

preview1 wasi can be adapted into a preview2 component, support of wasip2 in rust merely makes the build simpler, it's not required at all

without further info I would suggest to upgrade wasmtime and use the component model if that makes sense for your project, and even if you would stay with preview1, you still should upgrade the dependencies :)

view this post on Zulip anb (Aug 22 2024 at 23:43):

Thanks Ramon. Looks like wasmtime::preview1 doesn't support the component model.

support of wasip2 in rust merely makes the build simpler

Any docs on how to build a rust program into wasip2 without the support of the compiler?

view this post on Zulip Joe Sylve (Aug 23 2024 at 00:23):

anb said:

Thanks Ramon. Looks like wasmtime::preview1 doesn't support the component model.

Take a look at cargo-component: https://github.com/bytecodealliance/cargo-component

A Cargo subcommand for creating WebAssembly components based on the component model proposal. - bytecodealliance/cargo-component

Last updated: Oct 23 2024 at 20:03 UTC