Hi, Is there way to customize how cargo component generates bindings similar to wit-bindgen?
Yes, there are (undocumented except for code :pensive:) settings one can add to package.metadata.component.bindings
in Cargo.toml
I'm away from a computer at the moment, but I can pull up the settings shortly
The relevant settings: https://github.com/bytecodealliance/cargo-component/blob/main/src/metadata.rs#L62-L75
Thanks. Will see if this is sufficient
Neither wit-bidden and cargo component doesn't support remapping of interfaces. File issue: https://github.com/bytecodealliance/cargo-component/issues/225. It's bit frustrating that there are 3 different bindgen implementations
Peter Huene said:
The relevant settings: https://github.com/bytecodealliance/cargo-component/blob/main/src/metadata.rs#L62-L75
Hi, seems like cargo-component doesn't support all settings of wit-bindgen: https://github.com/bytecodealliance/wit-bindgen/blob/90a1e547e1a4515a5769f5d157ffc519c5d851a3/crates/rust/src/lib.rs#L87-L189
Is it planned to add support to them?
There's an issue to support with
, but beyond that there hasn't been asks for other configuration options to be supported; if you have a particular need for one, I would suggest filing an issue or opening a PR
I opened a PR to add support for all the missing settings but I don't know if it's relevant to add them all since as you said other configuration options have not been requested to be supported. https://github.com/bytecodealliance/cargo-component/pull/273
Thanks for putting up the PR!
Last updated: Nov 25 2024 at 19:03 UTC