I've created a couple WASM components with different languages and now I'd like to import them in a Rust app. However, between cargo-component-bindings, cargo components and wit-bindgen, I'm not sure where to begin.
I created the component in Rust without the cargo component command so I was hoping I could use wit-bindgen to consume the component in another Rust crate. After doing raw wit-bindgen on both sides, I would evaluate the process using the cargo component command. However, the only docs I can find for consuming WASM components in a Rust binary use the cargo component command for the runtime and component authoring.
Is wit-bindgen necessary in the runtime host crate or can the wasmtime crate just reference a WASM file that's built as a component? Is cargo component authoring only necessary if I'm using crates as a package authoring mechanism for the WASM component?
Took longer to write that then it did to read the docs for wasmtime::component
Whoops
Last updated: Nov 25 2024 at 19:03 UTC