johnthagen/min-sized-rust

Document removing the embedded backtracer

开放

#78 创建于 2025年4月13日

 (1 条评论) (4 个反应) (0 位负责人)Rust (144 个派生)batch import
good first issue

仓库指标

星标
 (4,998 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南