I am trying to play with interface types and it seems that wasmtime no longer has them enabled? Still trying to grok the ecosystem... Goal is getting something like this compiling so I can play around with types:
#[wasm_bindgen]
pub fn greet(name: &str) -> String {
format!("hello {}", name)
}
And if wasmtime isn't the best way to go for playing with interface-types... what is?
also I should probably cross post this to wasmtime but not 100% sure how to do that in zulip
cross posted to #wasmtime > hello world for interface types
Hi @Carl Sverre. You may want to look at witx-bindgen which has tooling around where we hope interface types is going. With witx-bindgen you can create import and export bindings from a "witx" file that stores a description of an interface. You can also generate bindings for Wasmtime to import an interface to an instance or to call an interface exported by an instance.
Additionally, there's wasmlink that can be used to link together independent wasm modules that implement interfaces.
Looks like I missed the cross post and Dan already replied, so ignore me :)
haha no worries - this is very helpful. I switched over to witx-bindgen and everything is working great now! thanks
Last updated: Dec 23 2024 at 13:07 UTC