Open
Description
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
.