Rust provides access to the values on the command line via the std::env::args function. We can use this in its raw form:
There are also crates that provide a much nicer and more comprehensive interface to parse the content of args
that were provided on the command line. We cover:
-
Clap - Command Line Argument Parser for Rust
We also maintain a list of Open Source Applications with links to many command line applications written in Rust.