[PR #45] Docs: the typed mod API and current native-mod builds #46

Open
opened 2026-11-03 04:02:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-site/pull/45
Author: @levzzz5154
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: docs/typed-mod-api


📝 Commits (1)

  • b0be6a9 Docs: the typed mod API, API versions and the current launcher's native builds

📊 Changes

6 files changed (+172 additions, -17 deletions)

View changed files

📝 content/docs/apis.md (+1 -1)
📝 content/docs/make-a-mod.md (+8 -4)
📝 content/docs/mod-code.md (+150 -4)
📝 content/docs/mod-manifest.md (+8 -3)
📝 content/docs/mods.md (+4 -4)
📝 content/docs/test-a-mod.md (+1 -1)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Opus 5.5), not by levzzz5154 personally.

The modding pages described the mod system as of about launcher 0.2.23 and hook API 2. This brings them up to date with the game's main branch, including the typed mod API (horizon-rust/horizon#6216, #6253).

mod-code

  • Intro: the catalog native-hooks.json (186 hook points, 109 helpers on main) and the two ways to write the code: mixin helpers or the typed API.
  • "The item panel and recipes (version 2)" becomes API versions: Nightly 2026-11-01 has 80, main 153; hooks by name (hook/hook_version, horizon-mixins 0.6.0).
  • New The typed API section: [api], the Hooks trait, events (#[non_exhaustive]), Flow, order, state (&self, Send + Sync), Host and what it lacks yet, level hosts, RenderHooks, attachments, [dependencies], trait_method injections, dispatch_* tests.
  • Its example (Soft pigs) compiles, and its test passes against main at c5c8a33a8.
  • It says what doesn't work yet: no Nightly has the typed API, and horizon-mods' native.py doesn't handle [api]. horizon-mixins rejects the table, and package leaves out the crate folder.

make-a-mod, mods, test-a-mod

  • Native mods install into the picked instance and build from the Native build of {instance} row.
  • There is no Native mods instance and no "Native mods (experimental)" setting any more.
  • Adds --instance and the dev build profile.
  • Launcher 0.2.37 or later builds typed mods; checked that the launcher@0.2.37 tag has native_mods/api.rs.

mod-manifest: rows for hook/hook_version, [api], [dependencies], [[crate]] and [[post_build]]. The hooks row now gives the current API numbers.

apis: the Mods row.

Checked: every in-site anchor on these six pages resolves with the site's own markdown.js slugger. Not checked: npm run build.

Sources: the game repo's docs/native-mods.md, crates/horizon-client/src/mod_api/generated*.rs, launcher/src/native_mods/api.rs and native-hooks.json on main.

🤖 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-site/pull/45 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/typed-mod-api` --- ### 📝 Commits (1) - [`b0be6a9`](https://github.com/horizon-rust/horizon-site/commit/b0be6a91e81da46428c04b123c4ca3fe038c3184) Docs: the typed mod API, API versions and the current launcher's native builds ### 📊 Changes **6 files changed** (+172 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `content/docs/apis.md` (+1 -1) 📝 `content/docs/make-a-mod.md` (+8 -4) 📝 `content/docs/mod-code.md` (+150 -4) 📝 `content/docs/mod-manifest.md` (+8 -3) 📝 `content/docs/mods.md` (+4 -4) 📝 `content/docs/test-a-mod.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Opus 5.5), not by levzzz5154 personally. The modding pages described the mod system as of about launcher 0.2.23 and hook API 2. This brings them up to date with the game's main branch, including the typed mod API (horizon-rust/horizon#6216, #6253). **mod-code** - Intro: the catalog `native-hooks.json` (186 hook points, 109 helpers on main) and the two ways to write the code: mixin helpers or the typed API. - "The item panel and recipes (version 2)" becomes **API versions**: Nightly 2026-11-01 has 80, main 153; hooks by name (`hook`/`hook_version`, horizon-mixins 0.6.0). - New **The typed API** section: `[api]`, the `Hooks` trait, events (`#[non_exhaustive]`), `Flow`, order, state (`&self`, `Send + Sync`), `Host` and what it lacks yet, level hosts, `RenderHooks`, attachments, `[dependencies]`, `trait_method` injections, `dispatch_*` tests. - Its example (Soft pigs) compiles, and its test passes against main at c5c8a33a8. - It says what doesn't work yet: no Nightly has the typed API, and horizon-mods' `native.py` doesn't handle `[api]`. horizon-mixins rejects the table, and `package` leaves out the crate folder. **make-a-mod, mods, test-a-mod** - Native mods install into the picked instance and build from the **Native build of {instance}** row. - There is no **Native mods** instance and no "Native mods (experimental)" setting any more. - Adds `--instance` and the `dev` build profile. - Launcher 0.2.37 or later builds typed mods; checked that the `launcher@0.2.37` tag has `native_mods/api.rs`. **mod-manifest**: rows for `hook`/`hook_version`, `[api]`, `[dependencies]`, `[[crate]]` and `[[post_build]]`. The `hooks` row now gives the current API numbers. **apis**: the Mods row. Checked: every in-site anchor on these six pages resolves with the site's own `markdown.js` slugger. Not checked: `npm run build`. Sources: the game repo's `docs/native-mods.md`, `crates/horizon-client/src/mod_api/generated*.rs`, `launcher/src/native_mods/api.rs` and `native-hooks.json` on main. 🤖 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>
Sign in to join this conversation.
No labels
pull-request
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-site#46
No description provided.