Is there an existing tool or interest in a tool to create a WIT definition from e.g. a C header file, or a Rust crate? That would make turning libraries into components much easier. That way you could e.g. share big Rust crates between components to reduce code size.
There's definitely interest, since people have been asking for it. I don't know of any existing tool, though.
Another option to reduce duplication is https://github.com/WebAssembly/component-model/blob/main/design/mvp/examples/SharedEverythingDynamicLinking.md which operates at the C ABI level rather than WIT, making it easier to accommodate existing APIs which may pass pointers around.
Last updated: Nov 22 2024 at 16:03 UTC