I currently try to upgrade my real-world host from wasmtime 10 to wasmtime 13 and noticed that quite a few things have changed. To better understand I observe a current wasmtime example where a component is created and the component is loaded from a Rust application.
One difference between given example and my current application is the data
parameter of Store
.
// my real-world app based on wasmtime 10
let mut store = Store::new(&engine, data: 0);
// wasmtime example based on wasmtime 13
let wasi_view = ServerWasiView::new()?;
let mut store = Store::new(&engine, wasi_view);
where ServerWasiView
is a struct with the two fields table
and ctx
.
My question is: do I need ServerWasiView
at all in order to launch a component from a Rust application?
What is it good for?
If you plan on using WASI then the WasiView
trait is required to be implemented for the T
in Store<T>
, but if you don't plan on using WASI there's no need to use that
(wrong chat maybe here trevor)
absolutely was, sorry about that!
Thank you for the clarification. I just need a "plain" component, at least currently. In my existing application, I compile to wasm32-unknown-unknown
and transform it to a component with wasm-tools thereafter. So I guess, I will try it again without wasi: data: 0
.
Christoph Brewing has marked this topic as resolved.
Last updated: Dec 23 2024 at 13:07 UTC