Skip to content

Feature Request: Run example #266

Open
@rawler

Description

@rawler

Cargo supports the notion of examples for library code. The feature is quite poorly documented - but immensely useful when building a lib.

Any .rs-file in examples/ is supposed to declare fn main() {}, and is compiled as a separate crate. (Being a perfect example of how to use the library, without the special permissions of being located in the same crate)

To run an example;

cargo run --example <basename of .rs>

It would be very useful to be able to run this from RustEnhanced, I.E main action "Run example..." with a list of every rs file in examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions