Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo component build does not add mod bindings to main.rs #361

Open
ifsheldon opened this issue Dec 8, 2024 · 0 comments
Open

cargo component build does not add mod bindings to main.rs #361

ifsheldon opened this issue Dec 8, 2024 · 0 comments

Comments

@ifsheldon
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant