Writing CLIs in Rust is awesome
…and it’s getting even better
Pascal Hertleif
2018-03-28
Hi, I’m Pascal
{twitter,github}.com/killercup
- famous crates: work with their authors to improve and stabilize
- write guide-level documentation
- pitching Rust as a great lang for CLIs on the new website
- for specific crates and use cases
- 1,045 replies
- we’ll post pretty pictures soon
Areas we are focussing on
Outputting stuff in CLI should be frictionless
- streaming and pipe handling
- logging
- for humans and machines
- best-practice-as-a-crate
Testing
- assert_cli refactoring & 1.0
- guide on testing cli apps
Distributing
- Coordinate and consolidate already existing efforts
- we can’t do everything, but we can provide guidelines and scaffolding!
Quicli
- re-exports commonly used items from other crates, e.g. structopt’s derive
- provides helpers like read_file (
-> String
)
- gives you a
main!
so you can do ?
“in main” (and get logging set up)
- since quicli 0.1 in january:
- rayon 1.0 shipped
- failure 1.0 announced
- CLI WG started
- quicli might become obsolete soon!
- clap 3 with include a custom derive (ETA: Before Rust 2018)
std::fs::read_string
(bikeshed half painted)
?
in main will be stable very soon
…please keep doing this, folks