Crate stdcli [−] [src]
stdcli: the cli batteries for rust
stdcli
is a metalibrary of the "batteries" of writing cli applications in rust. Its only
primary goal is to make experiementation easier in rust, with a secondary goal of
reducing the use of version = "*"
in one-off cli scripts so that scripts people write can
be more robust.
The general intended workflow is:
- Use stdcli
with cargo-script
to write single-file scripts that contain all
dependencies
- If/when the script grows larger than a single file, break it out using cargo new
and
use a full-featured project. You can still use stdcli
.
- If/when you need more full control of your dependencies, grab what you need and go!
stdcli
currently rexports macros so requires a nightly version of rust to be used.
Reexports
pub extern crate chrono; |
pub extern crate console; |
pub extern crate ctrlc; |
pub extern crate dialoguer; |
pub extern crate failure; |
pub extern crate failure_derive; |
pub extern crate fern; |
pub extern crate indicatif; |
pub extern crate itertools; |
pub extern crate lazy_static; |
pub extern crate libc; |
pub extern crate maplit; |
pub extern crate rand; |
pub extern crate rayon; |
pub extern crate regex; |
pub extern crate reqwest; |
pub extern crate semver; |
pub extern crate serde; |
pub extern crate serde_derive; |
pub extern crate serde_json; |
pub extern crate serde_yaml; |
pub extern crate shellexpand; |
pub extern crate structopt; |
pub extern crate structopt_derive; |
pub extern crate tabwriter; |
pub extern crate tar; |
pub extern crate tempdir; |
pub extern crate toml; |
pub extern crate walkdir; |
Modules
prelude |
|
term |
Exports a unified terminal interface. |
Macros
btreemap |
Create a BTreeMap from a list of key-value pairs |
btreeset |
Create a BTreeSet from a list of elements. |
format_err |
Construct an Error using the standard string interpolation syntax. |
hashmap |
Create a HashMap from a list of key-value pairs |
hashset |
Create a HashSet from a list of elements. |
iproduct |
Create an iterator over the “cartesian product” of iterators. |
izip |
Create an iterator running multiple iterators in lockstep. |
lazy_static |
Functions
init_log |
One liner to init loglevel using a number for the verbosity. The verbosities are:
- |