[PR #1433] [MERGED] Build naga once for the game, its tests and its examples #3521

Closed
opened 2026-11-03 04:10:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1433
Author: @ludovic111
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @ludovic111

Base: main ← Head: chore/unify-naga-features


📝 Commits (1)

  • 1d81c67 Build naga once for the game, its tests and its examples

📊 Changes

1 file changed (+3 additions, -5 deletions)

View changed files

📝 crates/horizon-client/Cargo.toml (+3 -5)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

From the review-0-survey (full code review plan: horizon-parity/reports/review-plan.md, workstream 6).

What

naga's hlsl-out feature moves from horizon-client's [dev-dependencies] to its normal naga dependency, and the dev-dependency goes.

Why

With resolver 2, a dev-dependency's extra features apply only to tests and examples. So Cargo kept two builds of naga, wgpu-hal, wgpu-core, wgpu, horizon-shaderpack and the horizon-client lib, and rebuilt that stack for the first example or test after a game build. That is what every harness run does (cargo run --example … after cargo build).

Measured on the Mac mini, in a fresh target dir: build the game, then build held_drop_fixture:

example after the game build recompiled target/
main 37.3 s naga, wgpu-naga-bridge, horizon-shaderpack, wgpu-hal, wgpu-core-deps-apple, wgpu-core, wgpu, horizon-client 4.9 GB
this PR 1.2 s horizon-client (the example) 3.9 GB

The game binary keeps the same size (241.09 MB debug either way): nothing outside the test calls the HLSL writer, so the linker drops it.

How tested

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 62a6b3a62, 8 min 21 s)

Check Result
Scope ✅ 1 files, +3 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (7 s)
clippy ✅ (1 min 6 s)
tests: horizon-client ✅ 1165 passed (6 min 31 s)
doc tests ✅ 0 passed (10 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 34 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, camera, cloud_render, container_screen, emitter_particles, entity_components, entity_particles, fire_starter_sound, firework_tooltip, first_person and 22 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Parity: 34 harnesses are affected (listed above). The local integration run with the dead-code PR built every probe with this change and the first 7 harnesses passed, 0 failed; CI's parity job runs the full --changed set.

Needs Ludovic

Nothing. Label: skip-release.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1433 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/unify-naga-features` --- ### 📝 Commits (1) - [`1d81c67`](https://github.com/horizon-rust/horizon/commit/1d81c67b7b4a2ae05fc20bd6e8fc0b9691238df9) Build naga once for the game, its tests and its examples ### 📊 Changes **1 file changed** (+3 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/Cargo.toml` (+3 -5) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. From the review-0-survey (full code review plan: `horizon-parity/reports/review-plan.md`, workstream 6). ## What naga's `hlsl-out` feature moves from horizon-client's `[dev-dependencies]` to its normal `naga` dependency, and the dev-dependency goes. ## Why With resolver 2, a dev-dependency's extra features apply only to tests and examples. So Cargo kept two builds of naga, wgpu-hal, wgpu-core, wgpu, horizon-shaderpack and the horizon-client lib, and rebuilt that stack for the first example or test after a game build. That is what every harness run does (`cargo run --example …` after `cargo build`). Measured on the Mac mini, in a fresh target dir: build the game, then build `held_drop_fixture`: | | example after the game build | recompiled | target/ | | --- | --- | --- | --- | | main | 37.3 s | naga, wgpu-naga-bridge, horizon-shaderpack, wgpu-hal, wgpu-core-deps-apple, wgpu-core, wgpu, horizon-client | 4.9 GB | | this PR | 1.2 s | horizon-client (the example) | 3.9 GB | The game binary keeps the same size (241.09 MB debug either way): nothing outside the test calls the HLSL writer, so the linker drops it. ## How tested **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 62a6b3a62, 8 min 21 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +3 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (7 s) | | clippy | ✅ (1 min 6 s) | | tests: horizon-client | ✅ 1165 passed (6 min 31 s) | | doc tests | ✅ 0 passed (10 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 34 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, camera, cloud_render, container_screen, emitter_particles, entity_components, entity_particles, fire_starter_sound, firework_tooltip, first_person and 22 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Parity: 34 harnesses are affected (listed above). The local integration run with the dead-code PR built every probe with this change and the first 7 harnesses passed, 0 failed; CI's parity job runs the full `--changed` set. ## Needs Ludovic Nothing. Label: skip-release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:10:08 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3521
No description provided.