Cargoプロジェクト Examplesの追加
Cargoで作ったライブラリプロジェクトにExamplesを追加することができる。
// examples/hello.rs fn main() { println!("Hello from an example!"); }
$ cargo run --example hello
$ cargo run --example hello2 -- Alice
Cargoで作ったライブラリプロジェクトにExamplesを追加することができる。
// examples/hello.rs fn main() { println!("Hello from an example!"); }
$ cargo run --example hello
$ cargo run --example hello2 -- Alice