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?
I also encountered the same problem. If I did not have wit files, cargo component still generated the bindings for me, and its content actually made no sense. I'll submit a PR for this.
I've been working on a number of projects which just directly pull the
wasi
crate, but don't do anything with a localwit/
directory. This produces asrc/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?