#command-line #serialization #reverse #structopt #serde #process #opts

serde-command-opts

A crate for serializing command line options (structopt in reverse)

2 releases

0.1.1 Feb 9, 2020
0.1.0 Feb 9, 2020

#12 in #structopt


Used in ip-command

Apache-2.0

16KB
442 lines

Serde Command Opts

A crate for serializing command line options (structopt in reverse).

Why?

When you are building a Rust wrapper for an existing, complex, CLI application it often makes sense to support typed arguments as structures.

serde-command-opts enables developers to easily convert a structure representation of command line options into a string vector ready for passing to a child process.

Documentation

For examples take a look at the simple test cases listed in this repository. The API and its ergonomics are based off and inspired by Serde so it should be a direct drop in.

License

Liberal open source, Apache 2.0.


lib.rs:

A crate for serializing command line options (structopt in reverse).

Dependencies

~0.5–1.1MB
~26K SLoC