cargo-component icon indicating copy to clipboard operation
cargo-component copied to clipboard

Preserve comments from wit file in the binary

Open lu4p opened this issue 1 year ago • 2 comments

Comments from the wit file are already copied to the bindings.rs file.

These should also be contained in the final component, so that wasm-tools component wit can provide some useful documentation on the component.

lu4p avatar Feb 06 '24 17:02 lu4p

I agree this would be a valuable feature! This is an issue for the component model spec - it has been discussed https://github.com/WebAssembly/component-model/issues/213 but has not yet been implemented yet.

pchickey avatar Feb 06 '24 19:02 pchickey

Commenting just to express support for this. Currently the raw wit needs to be published alongside the final components if we want tooling to show the interface documentation.

James-Mart avatar Mar 05 '24 14:03 James-Mart