Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.36k stars 583 forks source link

Rewrite command-line argument parsing #243

Open rom1v opened 4 years ago

rom1v commented 4 years ago

Some times ago, I attempted to use structopt (structopt branch). It worked well and the source code was far better. However, it made the resulting binary 6× bigger (and more than doubled the compilation time). For instance the release+stripped version grew from 600K to 4M, so at least 85% of the binary was related to command-line parsing.

Maybe things have improved since then. Maybe with clap: https://clap.rs/2018/01/09/new-years-weight-loss/

In any case, the current manual parsing is a mess (both in Java and Rust) and makes it difficult to support new arguments.

timea-techgirl commented 4 years ago

Personally file size isn't an issue for me.