bevy/.github/workflows
François Mockers 4e694aea53
ECS: put strings only used for debug behind a feature (#19558)
# Objective

- Many strings in bevy_ecs are created but only used for debug: system
name, component name, ...
- Those strings make a significant part of the final binary and are no
use in a released game

## Solution

- Use [`strings`](https://linux.die.net/man/1/strings) to find ...
strings in a binary
- Try to find where they come from
- Many are made from `type_name::<T>()` and only used in error / debug
messages
- Add a new structure `DebugName` that holds no value if `debug` feature
is disabled
- Replace `core::any::type_name::<T>()` by `DebugName::type_name::<T>()`

## Testing

Measurements were taken without the new feature being enabled by
default, to help with commands

### File Size

I tried building the `breakout` example with `cargo run --release
--example breakout`

|`debug` enabled|`debug` disabled|
|-|-|
|81621776 B|77735728B|
|77.84MB|74.13MB|

### Compilation time

`hyperfine --min-runs 15 --prepare "cargo clean && sleep 5"
'RUSTC_WRAPPER="" cargo build --release --example breakout'
'RUSTC_WRAPPER="" cargo build --release --example breakout --features
debug'`

```
breakout' 'RUSTC_WRAPPER="" cargo build --release --example breakout --features debug'
Benchmark 1: RUSTC_WRAPPER="" cargo build --release --example breakout
  Time (mean ± σ):     84.856 s ±  3.565 s    [User: 1093.817 s, System: 32.547 s]
  Range (min … max):   78.038 s … 89.214 s    15 runs

Benchmark 2: RUSTC_WRAPPER="" cargo build --release --example breakout --features debug
  Time (mean ± σ):     92.303 s ±  2.466 s    [User: 1193.443 s, System: 33.803 s]
  Range (min … max):   90.619 s … 99.684 s    15 runs

Summary
  RUSTC_WRAPPER="" cargo build --release --example breakout ran
    1.09 ± 0.05 times faster than RUSTC_WRAPPER="" cargo build --release --example breakout --features debug
```
2025-06-18 20:15:25 +00:00
..
action-on-PR-labeled.yml Add basic release content tagging workflow (#18568) 2025-03-27 17:46:39 +00:00
ci-comment-failures.yml Fix CI comment workflow after 18196 (#18217) 2025-03-09 22:50:57 +00:00
ci.yml ECS: put strings only used for debug behind a feature (#19558) 2025-06-18 20:15:25 +00:00
dependencies.yml add cancel in progress support to automated CI checks (#11130) 2024-02-28 16:07:29 +00:00
docs.yml bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
example-run-report.yml action shouldn't comment on a pr if last comment is from action (#18196) 2025-03-09 20:26:19 +00:00
example-run.yml Split example runs to their own GitHub workflow (#18039) 2025-02-25 23:30:31 +00:00
post-release.yml Fix workflows for version bump (#17162) 2025-01-05 20:27:58 +00:00
send-screenshots-to-pixeleagle.yml Split example runs to their own GitHub workflow (#18039) 2025-02-25 23:30:31 +00:00
validation-jobs.yml Split example runs to their own GitHub workflow (#18039) 2025-02-25 23:30:31 +00:00
weekly.yml Automatically close weekly ci issue if weekly ci succeeds (#18016) 2025-02-25 19:21:04 +00:00
welcome.yml bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00