rust/library/std
Samuel Tardieu 2e37e24179
Rollup merge of #143910 - ChrisDenton:no-symbolization, r=tgross35
Add experimental `backtrace-trace-only` std feature

This experimentally allows building std with backtrace but without symbolisation. It does not affect stable and requires build-std to use. This doesn't change the backtrace crate itself so relies on the optimizer to remove the unused parts.

Example usage:

```toml
# .cargo/config.toml
[unstable]
build-std = ["core", "alloc", "panic_unwind", "std"]
build-std-features = ["backtrace", "backtrace-trace-only", "panic-unwind"]
```

```toml
# Cargo.toml
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
```

Ideally we should split the backtrace feature into `backtrace-trace` and `backtrace-symbolize` (with the latter dependent on the former) because Cargo features tend to work better when they're positive rather than negative. But I'm keen for this experiment not to break existing users.

cc ``@joshtriplett``
2025-07-15 12:52:42 +02:00
..
benches Fix import in bench for wasm 2025-02-12 14:44:30 -08:00
src Rollup merge of #143910 - ChrisDenton:no-symbolization, r=tgross35 2025-07-15 12:52:42 +02:00
tests Auto merge of #141829 - dvdsk:sleep_until_linux, r=cuviper,RalfJung 2025-07-06 23:00:51 +00:00
build.rs Use feature(target_has_reliable_f16_f128) in library tests 2025-04-27 20:10:33 +00:00
Cargo.toml Add experimental backtrace-trace-only std feature 2025-07-14 11:52:17 +00:00