Comments (3)
https://www.reddit.com/r/rust/comments/exbbes/argh_is_googles_opinionated_derivebased_argument/
from stella2.
Base version: 3aebf68
#[derive(argh::FromArgs)]
/// A lightweight instant messaging client.
struct Args {
/// the path to a custom profile directory
#[argh(option)]
profile: Option<String>,
}
let measure_start = unsafe { std::arch::x86_64::_rdtsc() };
let _: Args = argh::from_env();
let measure_end = unsafe { std::arch::x86_64::_rdtsc() };
dbg!(measure_end - measure_start);
Library | CPU cycles¹ | .text size |
---|---|---|
None | 0 | 462848 |
argh |
20569 | 475136 (+12KiB) |
gumdrop |
23549 | 475136 (+12KiB) |
clap (minimum) |
283296 | 860160 (+388KiB) |
pico-args ² |
26356 | 475136 (+12KiB) |
¹ The minimum value of circa 10 samples. To simulate the common usage, no command-line arguments were provided.
² pico-args
does not support help generation. The application handles -h
manually and prints a pre-formatted help message.
from stella2.
Implemented a custom command-line parsing solution in ed5e0d8.
Library | CPU cycles¹ | .text size |
---|---|---|
None | 0 | 462848 |
Custom Solution | 20977 | 471040 (+8KiB) |
from stella2.
Related Issues (13)
- Minimum platform abstraction layer HOT 2
- Support Slack
- Enable Control Flow Guard HOT 1
- Improve the composition performance on GTK
- Common widgets
- Basic user interface HOT 4
- Optimize code
- Testability
- Add application metadata (icon, Info.plist, etc.)
- Additional features for platform abstraction layer
- Enable the testing backend in CI HOT 1
- Translation system HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stella2.