johnthagen / johnthagen/min-sized-rust

Document removing the embedded backtracer

Open
#78 1 comment 4 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
9.8k
Forks
247
PR merge metrics
No merged PRs in 30d

Description

As suggested in https://github.com/google/bloaty/issues/110#issuecomment-2571410292 and discussed in [a Reddit post](https://www.reddit.com/r/rust/comments/1inh4vk/comment/mcdusu6), 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](https://github.com/johnthagen/min-sized-rust?tab=readme-ov-file#abort-on-panic) section, as the embedded backtracer should be unused when aborting on `panic!()`s.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.