#parser #parse #arguments-parser #argument #arg #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

#94 in #arg

Download history 6/week @ 2024-09-18 8/week @ 2024-09-25

147 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

~28KB