Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace clap with a simple hand-written arg parser #411

Merged
merged 2 commits into from
Aug 8, 2023
Merged

Commits on Aug 7, 2023

  1. Replace clap with a simple hand-written arg parser

    clap is too heavyweight for what tiny needs. Replacing it with a simple
    hand-written parser reduces debug binary sizes a constant 14 MiB (!), and
    release binary sizes ~400 KiB.
    
    - Default build, debug:
      - Before: 73M
      - After: 59M
      - Diff: -14M, -29%
    
    - Default build, release:
      - Before: 6.4M
      - After: 6.0M
      - Diff: -0.4M, -6%
    
    - Native TLS build, release:
      - Before: 4.6M
      - After: 4.2M
      - Diff: -0.4M, -8%
    
    Also saves ~10s build time and ~3s `cargo check` time.
    osa1 committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    32b6596 View commit details
    Browse the repository at this point in the history
  2. Fail on unsupported flags

    osa1 committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    2d79bde View commit details
    Browse the repository at this point in the history