Crate
- crate name: trait_exerci
- folder name: lib-hello
- description: how to understand the rust feature trait
I. develop the crate
Step 1: create the default crate
mkdir lib-hello && cd lib-hello
cargo init --name trait_exerci --lib
Step 2: develop the crate source and test codes
vi Cargo.toml
vi src/lib.rs
cargo fmt
cargo clippy mkdir tests
touch tests/hello.rs
vi tests/hello.rs
touch tests/mod_hello.rs
vi tests/mod_hello.rs
cargo fmt
cargo clippy
cargo test
Step 3: develop the example codes
mkdir examples
touch examples/hello.rs
vi examples/hello.rs
cargo run --example hello