Closed hvwaldow closed 1 month ago
cargo init --name s4n
8da035cffc8aa1141c922a32ef49106d71158039clap
crate by cargo add clap --features derive
daf7789cca890ebc449e4e5d05b07fbc529f2355cli.rs
40e969859cfc6d5e9f89b854c049086ec8da1448
Entry point method main
is reponsible for parsing the commands, currently only a simple dummy command is implemented which outputs the args it gets. The command structure is defined in cli.rs
- business logic does not belong there!Running cargo run dummy create name -o lol
will output:
Compiling s4n v0.1.0 (/home/ubuntu/m4.4_sciwin_client)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.40s
Running `target/debug/s4n dummy create name -o lol`
Dummy creation called with CreateDummyArgs { name: "name", option: Some("lol") }
Setup dev repo for Rust development. Document for beginners 😄