NickLarsenNZ opened issue #12591:
When I expand the code generated by this macro:
wasmtime::component::bindgen!({ world: "plugin", path: "../wit", });There appears to be additional
/ending up in the actual doc comments:#[doc = "/ Auto-generated bindings for a pre-instantiated version of a"] #[doc = "/ component which implements the world `plugin`."] #[doc = "/"] #[doc = "/ This structure is created through [`PluginPre::new`] which"] #[doc = "/ takes a [`InstancePre`](wasmtime::component::InstancePre) that"] #[doc = "/ has been created through a [`Linker`](wasmtime::component::Linker)."] #[doc = "/"] #[doc = "/ For more information see [`Plugin`] as well."] pub struct PluginPre<T: 'static> { instance_pre: wasmtime::component::InstancePre<T>, indices: PluginIndices, }
NickLarsenNZ edited issue #12591:
With:
wasmtime = { version = "41.0.3", features = ["component-model"] }When I expand the code generated by this macro:
wasmtime::component::bindgen!({ world: "plugin", path: "../wit", });There appears to be additional
/ending up in the actual doc comments:#[doc = "/ Auto-generated bindings for a pre-instantiated version of a"] #[doc = "/ component which implements the world `plugin`."] #[doc = "/"] #[doc = "/ This structure is created through [`PluginPre::new`] which"] #[doc = "/ takes a [`InstancePre`](wasmtime::component::InstancePre) that"] #[doc = "/ has been created through a [`Linker`](wasmtime::component::Linker)."] #[doc = "/"] #[doc = "/ For more information see [`Plugin`] as well."] pub struct PluginPre<T: 'static> { instance_pre: wasmtime::component::InstancePre<T>, indices: PluginIndices, }
NickLarsenNZ commented on issue #12591:
The docs in the template appear to be correct:
pchickey commented on issue #12591:
To check whether this is an artifact of wasmtime's bindgen or your code expansion, can you try setting
WASMTIME_DEBUG_BINDGEN=1in your environment? That will have bindgen write a separate.rsfile in OUT_DIR andinclude!that file in place, which sometimes has a better experience for debugging because errors get line numbers.If that resolves your issue, then what you are seeing is down to whatever mechanism you are using to expand the macro.
Last updated: Feb 24 2026 at 04:36 UTC