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

Reduce binary size from 2.4MB to 1.9MB #162

Merged
merged 1 commit into from Aug 24, 2020
Merged

Commits on Aug 23, 2020

  1. Reduce binary size from 2.4MB to 1.9MB

    By default, Cargo instructs compilation units to be compiled and optimized
    in isolation. LTO instructs the linker to optimize at the link stage.
    This can, for example, remove dead code and often times reduces binary size.
    
    By default, when Rust code encounters a situation when it must call panic!(),
    it unwinds the stack and produces a helpful backtrace. The unwinding code,
    however, does require extra binary size. rustc can be instructed to abort
    immediately rather than unwind, which removes the need for this extra unwinding code.
    
    For more information see: https://github.com/johnthagen/min-sized-rust
    bernardoamc committed Aug 23, 2020
    Configuration menu
    Copy the full SHA
    499ff66 View commit details
    Browse the repository at this point in the history