Stream: wit-bindgen

Topic: ✔ Componets with WASI preview 2


view this post on Zulip Scott Waye (May 19 2023 at 02:25):

Is it possible to use cargo build --target wasm32-wasi and wasm-tools component new to create components that use WASI preview 2?

view this post on Zulip Peter Huene (May 19 2023 at 02:38):

Currently, Rust's wasm32-wasi target is for preview1, so a preview1 to preview2 adapter is required for the resulting component to import WASI

view this post on Zulip Peter Huene (May 19 2023 at 02:38):

eventually that'll change so that adapting is no longer required

view this post on Zulip Scott Waye (May 19 2023 at 03:01):

Thanks, I have a component now from wasm-tools component new ./target/wasm32-wasi/debug/rustimpl.wasm -o my-component.wasm --adapt wasi_snapshot_preview1=.\wasi_preview1_component_adapter.reactor.wasm

view this post on Zulip Notification Bot (May 19 2023 at 03:01):

Scott Waye has marked this topic as resolved.


Last updated: Dec 23 2024 at 12:05 UTC