#arguments-parser #argument #arg #parser #parse #cli

macro onlyargs_derive

Obsessively tiny argument parsing derive macro

6 releases

0.2.0 Feb 22, 2024
0.1.4 Feb 19, 2024
0.1.2 Apr 13, 2023

#84 in #arg

38 downloads per month

MIT license

56KB
1K SLoC

Crates.io Documentation unsafe forbidden GitHub actions GitHub activity GitHub Sponsors

Only argument parsing! Nothing more.

Why?

  • 100% safe Rust 🦀.
  • Correctness: Paths with invalid UTF-8 work correctly on all platforms.
  • Fast compile times.
  • Convenience: #[derive(OnlyArgs)] on a struct and parse CLI arguments from the environment into it with minimal boilerplate.

MSRV Policy

The Minimum Supported Rust Version for onlyargs will always be made available in the MSRV.md file on GitHub.

Examples

See the derive-example for usage.

Dependencies

~25KB