Skip to content

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

Open

Description

@ifsheldon

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions