Wasmtime's component bindgen macro turns a WIT world into Rust bindings and glue code, giving a host typed interfaces for implementing imports and calling component exports. section 3.4.2
SmartCMS host
Add the macro with the WIT path and world name. It generates the Host trait and application API. Implement the key-value store with a Rust HashMap, register it through the generated linker helper, instantiate the component, and call run. section 3.4.2
wasmtime::component::bindgen!({
path: "./smart_cms.wit",
world: "app",
});
Inspect the macro invocation that selects the WIT file and app world used for code generation. section 3.4.2
