johnthagen/min-sized-rust

Document removing the embedded backtracer

Offen

#78 geöffnet am 13.04.2025

 (1 Kommentar) (4 Reaktionen) (0 zugewiesene Personen)Rust (144 Forks)batch import
good first issue

Repository-Metriken

Stars
 (4.998 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

As suggested in https://github.com/google/bloaty/issues/110#issuecomment-2571410292 and discussed in a Reddit post, disabling the backtrace feature in std can reduce the binary size by a fixed amount of ~300 kB. This may be significant for programs aiming to be absolutely minimal, e.g. a "Hello, world!" program can be reduced in size by 83%.

This information could be added to the Abort on Panic section, as the embedded backtracer should be unused when aborting on panic!()s.

Contributor Guide