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

`cargo component build` always produces a `bindings.rs` file

Open yoshuawuyts opened this issue 7 months ago • 1 comments

I've been working on a number of projects which just directly pull the wasi crate, but don't do anything with a local wit/ directory. This produces a src/bindings.rs file, despite not actually ever being used. This can be a little confusing for people trying to read the code, because there is currently always an unused but important-sounding file sitting in the project hierarchy.

Can we make generating this file conditional on, say, whether there is a local wit/ directory present?

yoshuawuyts avatar Jun 28 '24 11:06 yoshuawuyts