dtolnay / dtolnay/anyhow

Make backtrace support optional

Open
#346 10 comments 15 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
6.7k
Forks
224
PR merge metrics
No merged PRs in 30d

Description

I'm using anyhow for error management in an environment where I care about the binary size. Managing contexts explicitly lets me use rustc's panic=abort mode without significantly reducing ease of debugging, as the "stacktrace" is provided by anyhow. panic=abort would typically greatly reduce binary size because libunwind would no longer need to be linked in. However, anyhow still brings in std::backtrace, which relies on libunwind internally, reducing the benefits of panic=abort.

Would it be possible (or desired) to add an opt-in feature to avoid using std::backtrace, as if `RUST_BACKTRACE=0` was always set? Alternatively, what about making `backtrace` an opt-out feature?

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.