[PR #1855] [MERGED] Registry: shader packs are checked by the game's own shader check, and open #3819

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

📋 Pull Request Information

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

Base: main ← Head: feat/native-shaders-registry


📝 Commits (5)

  • 1285247 Registry: shader packs are checked by the game's own shader check, and open
  • 390da26 horizon-mod-registry: the form's test sends a shader pack through the game's check
  • df8b236 horizon-mods: rustfmt
  • cbdbf06 Merge main into feat/native-shaders-registry
  • a1f1501 launcher: Cargo.lock follows horizon-mods' shader check

📊 Changes

10 files changed (+448 additions, -40 deletions)

View changed files

📝 Cargo.lock (+1 -0)
📝 crates/cargo-horizon-mod/src/check.rs (+4 -1)
📝 crates/horizon-mod-registry/Cargo.lock (+243 -8)
📝 crates/horizon-mod-registry/tests/submit.rs (+3 -2)
📝 crates/horizon-mods/Cargo.toml (+3 -1)
📝 crates/horizon-mods/src/index.rs (+33 -14)
📝 crates/horizon-mods/src/index/registry/tests.rs (+6 -2)
📝 crates/horizon-mods/src/index/tests.rs (+52 -0)
📝 docs/api/mod-index.md (+8 -5)
📝 launcher/Cargo.lock (+95 -7)

📄 Description

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

Main is merged in (2026-10-26). The post stage (#1861) is in the game, and the Shader Packs page (#2028) and the launcher's Shader packs tab (next PR) follow.

What

The registry's shader kind gets its check, the game's own:

  • index::inspect(Kind::Shader, file) reads the .hshader and runs horizon_shader_api::check, the check the game runs before it loads a pack. A pack the game would refuse is refused by the registry's CI (cargo horizon-mod check, registry build), every problem at its file and line. Facts: the manifest's id, version and shader API line (Facts::matches names them on a mismatch).
  • Kind::Shader.extension() is hshader; cargo horizon-mod check recognises the extension and prints glow 1.0.0 (shader, shader API 0.1).
  • registry::open(Kind::Shader) is Ok: shader submissions open.
  • check_file (the launcher's verification before an install) still refuses a shader until the launcher installs shader packs (the Horizon tab's step).
  • docs/api/mod-index.md: the kind is open, how it's checked.

horizon-mods' index feature now depends on horizon-shader-api (naga with the SPIR-V/MSL/HLSL writers); crates/horizon-mod-registry/Cargo.lock follows.

How tested

cargo test -p horizon-mods --features index: 26 passed
  new: shader_packs_pass_the_game_s_own_check (a packaged pack's facts; a broken one refused at post.wgsl:1:; a .hpack
       refused for its missing horizon-shaders.toml; extension hshader; open)
  updated: only_open_kinds_are_taken, lists_every_problem_of_a_registry (a shader entry is now checked like the others)
cargo test -p cargo-horizon-mod: 2 passed (the shader case now reports the missing horizon-shaders.toml)
cargo clippy -p horizon-mods -p cargo-horizon-mod --all-targets -- -D warnings: clean

Self-check after merging main

launcher/Cargo.lock now follows: the launcher links horizon-mods' index feature, so it gets horizon-shader-api and naga. That is the same check the launcher runs before an install.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at ee6dfd2b6, 11 min 28 s)

Check Result
Scope ⚠️ 10 files, +448 −40; mixes game, launcher
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (13 s)
clippy ✅ (1 s)
tests: workspace ✅ 2171 passed (2 min 29 s)
doc tests ✅ 1 passed (16 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (3 min 58 s)
launcher tests ✅ 129 passed (4 min 28 s)
Parity ➖ 338 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 326 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Parity: the 346 harnesses are selected because horizon-mods' Cargo.toml changed. The code change is behind horizon-mods' index feature, which the game doesn't build, so I left them to CI's parity job.

Order

Ludovic approved opening the registry to shader packs (2026-10-25). The game side has landed: post stage, F3 timing, the Shader Packs page (#2026, #2028), the shared frame (#2051), and the sky stage (#1863, queued). The launcher's Shader packs tab is #2036, stacked on this PR: until it merges, the launcher skips shader entries, as before.

🤖 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/1855 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/native-shaders-registry` --- ### 📝 Commits (5) - [`1285247`](https://github.com/horizon-rust/horizon/commit/1285247230500a881205486c3a5153dfb4b82ac2) Registry: shader packs are checked by the game's own shader check, and open - [`390da26`](https://github.com/horizon-rust/horizon/commit/390da26cf4442554d408f3fdf9318253a2e944a6) horizon-mod-registry: the form's test sends a shader pack through the game's check - [`df8b236`](https://github.com/horizon-rust/horizon/commit/df8b23637eb524d83e7260c16acc250c01b06dc8) horizon-mods: rustfmt - [`cbdbf06`](https://github.com/horizon-rust/horizon/commit/cbdbf068bf17f9cc10ea6731a4d203b92813ae66) Merge main into feat/native-shaders-registry - [`a1f1501`](https://github.com/horizon-rust/horizon/commit/a1f1501305f7968e169ca04517aa223617d4ea2e) launcher: Cargo.lock follows horizon-mods' shader check ### 📊 Changes **10 files changed** (+448 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+1 -0) 📝 `crates/cargo-horizon-mod/src/check.rs` (+4 -1) 📝 `crates/horizon-mod-registry/Cargo.lock` (+243 -8) 📝 `crates/horizon-mod-registry/tests/submit.rs` (+3 -2) 📝 `crates/horizon-mods/Cargo.toml` (+3 -1) 📝 `crates/horizon-mods/src/index.rs` (+33 -14) 📝 `crates/horizon-mods/src/index/registry/tests.rs` (+6 -2) 📝 `crates/horizon-mods/src/index/tests.rs` (+52 -0) 📝 `docs/api/mod-index.md` (+8 -5) 📝 `launcher/Cargo.lock` (+95 -7) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Main is merged in (2026-10-26). The post stage (#1861) is in the game, and the Shader Packs page (#2028) and the launcher's Shader packs tab (next PR) follow. ## What The registry's `shader` kind gets its check, the game's own: - `index::inspect(Kind::Shader, file)` reads the `.hshader` and runs `horizon_shader_api::check`, the check the game runs before it loads a pack. A pack the game would refuse is refused by the registry's CI (`cargo horizon-mod check`, `registry build`), every problem at its file and line. Facts: the manifest's id, version and shader API line (`Facts::matches` names them on a mismatch). - `Kind::Shader.extension()` is `hshader`; `cargo horizon-mod check` recognises the extension and prints `glow 1.0.0 (shader, shader API 0.1)`. - `registry::open(Kind::Shader)` is Ok: shader submissions open. - `check_file` (the launcher's verification before an install) still refuses a shader until the launcher installs shader packs (the Horizon tab's step). - docs/api/mod-index.md: the kind is open, how it's checked. `horizon-mods`' `index` feature now depends on `horizon-shader-api` (naga with the SPIR-V/MSL/HLSL writers); `crates/horizon-mod-registry/Cargo.lock` follows. ## How tested ``` cargo test -p horizon-mods --features index: 26 passed new: shader_packs_pass_the_game_s_own_check (a packaged pack's facts; a broken one refused at post.wgsl:1:; a .hpack refused for its missing horizon-shaders.toml; extension hshader; open) updated: only_open_kinds_are_taken, lists_every_problem_of_a_registry (a shader entry is now checked like the others) cargo test -p cargo-horizon-mod: 2 passed (the shader case now reports the missing horizon-shaders.toml) cargo clippy -p horizon-mods -p cargo-horizon-mod --all-targets -- -D warnings: clean ``` ## Self-check after merging main `launcher/Cargo.lock` now follows: the launcher links horizon-mods' `index` feature, so it gets `horizon-shader-api` and naga. That is the same check the launcher runs before an install. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at ee6dfd2b6, 11 min 28 s) | Check | Result | | --- | --- | | Scope | ⚠️ 10 files, +448 −40; mixes game, launcher | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (13 s) | | clippy | ✅ (1 s) | | tests: workspace | ✅ 2171 passed (2 min 29 s) | | doc tests | ✅ 1 passed (16 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (3 min 58 s) | | launcher tests | ✅ 129 passed (4 min 28 s) | | Parity | ➖ 338 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 326 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Parity: the 346 harnesses are selected because horizon-mods' Cargo.toml changed. The code change is behind horizon-mods' `index` feature, which the game doesn't build, so I left them to CI's parity job. ## Order Ludovic approved opening the registry to shader packs (2026-10-25). The game side has landed: post stage, F3 timing, the Shader Packs page (#2026, #2028), the shared frame (#2051), and the sky stage (#1863, queued). The launcher's Shader packs tab is #2036, stacked on this PR: until it merges, the launcher skips shader entries, as before. 🤖 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:12:32 +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#3819
No description provided.