cargo-component
cargo-component copied to clipboard
`cargo component build` does not add `mod bindings` to `main.rs`
When I walked through the tutorial in https://component-model.bytecodealliance.org/language-support/rust.html#importing-an-interface-into-a-command-component with my own adder example, after Step 3 adding package.metadata.component.target.dependencies and running cargo build component, I found bindings.rs was generated under src folder, but mod bindings was not added to main.rs.
main.rs was initially created by cargo component new my-command-component with the content
fn main() {
println!("Hello World");
}
I think after generating bindings.rs, cargo-component should automatically attach it to main.rs.