The release
Every SDK is the release sdk-<build id> of this repository, at
https://github.com/arismoko/horizon/releases/download/sdk-<build id>/<file>. Its files:
| File | Kind | Holds |
|---|---|---|
surface.json | surface | The stable surface: everything an API-only mod can name, each item with its fingerprint (surface.json). |
build-data.tar.xz | build-data | points.json, internals.json, loops.json and functions.json: data pinned to this build, with no compatibility promise. |
api-source.tar.xz | api-source | The mod API's crates with their generated code written out: what a mod project's .horizon/sdk/api/ holds. |
runtime-aarch64-apple-darwin.tar.xz, runtime-x86_64-pc-windows-gnu.tar.xz, runtime-x86_64-unknown-linux-gnu-server.tar.xz, runtime-x86_64-unknown-linux-gnu.tar.xz | runtime | The game's libraries, the prebuilt program the API route links mods into, its stub mods library and the package's identity file. |
api-aarch64-apple-darwin.tar.xz, api-x86_64-pc-windows-gnu.tar.xz, api-x86_64-unknown-linux-gnu-server.tar.xz, api-x86_64-unknown-linux-gnu.tar.xz | api | Metadata of the mod API's crates and their procedural macros, the point data and the mods library's template: what a mod on the mod API alone builds against. |
engine-aarch64-apple-darwin.tar.xz, engine-x86_64-pc-windows-gnu.tar.xz, engine-x86_64-unknown-linux-gnu-server.tar.xz, engine-x86_64-unknown-linux-gnu.tar.xz | engine | Every other file of the prebuilt game: what a mod with a [native.*] table, game internals or a registry dependency builds against as well. |
sdk.json | The index: the build, every other asset with its SHA-256, size, kind and codec (fields). | |
SHA256SUMS | The SHA-256 of every file of the release. | |
SHA256SUMS.sig | Horizon's signature over SHA256SUMS for the tag sdk-<build id>. |
The compiled slices exist once per host; a file named …-server.tar.xz is the dedicated server's.
Everything else exists once per build. .tar.xz files are tar archives compressed with xz; surface.json is the
file itself.
A Nightly carries a copy of its build's sdk.json in its own signed sums. The launcher learns which build a game is
from the copy in that game's release, and keeps the answer, so it is known offline afterwards.
Which slices a build needs
The launcher fetches only the compiled slices the instance's mods need, decided once for the whole set of enabled mods. The routes and their slices come from the same input list the launcher and the packager read:
| Route | When | Slices it fetches |
|---|---|---|
api | Every enabled mod uses the mod API alone. | runtime, api |
engine | A mod has a [native.*] table, names game internals, or depends on a registry (crates.io) crate. | runtime, api, engine |
Each slice unpacks into its own folder. Using a kept slice again checks only its files' names and sizes against a stamp written after its verified unpack; it does not hash them again.
sdk.json
The index. Readers ignore fields they don't know and refuse a schema they don't know: adding a field keeps the
number, removing or redefining one changes it.
| Field | What it is |
|---|---|
schema | The index's schema number (1). |
build.commit | The build id: the game's full commit sha. |
build.game | The vanilla version the build implements (26.3). |
build.date | The commit's date, YYYY-MM-DD, UTC. |
build.nightly | The Nightly name that ships this build, when one does. |
package_format | The prebuilt package's layout number. A reader takes only the number it was made for. |
toolchain.rust | The Rust release everything in the SDK was compiled with. |
content_api | The content manifest's version: the api key of horizon-mod.toml. |
surface.hash | surface.json's own hash: equal hashes, equal surface. |
surface.previous | The build id of the SDK published before this one, which it is compared with. Absent on the first. |
surface.source | That comparison in one word, its worst change: identical, additive, conditional or breaking (classes). |
surface.changes | The ids of the records that changed, breaking ones first. |
surface.notes | The change notes attached to them, each { ids, why, migrate } (notes). |
mixins.rev, mixins.patch | The pinned horizon-mixins tool's revision and the SHA-256 of the patch carried on it. |
assets | Every file of the release but sdk.json and the sums, by name: sha256, size, kind, codec (none or xz), and for a compiled slice its target and side (client or server). |
inputs | The files each route needs, named before any download, build or packaging starts: its SDK slices, the programs beside the game and the checkout files, how to make each, and what each slice must hold. |
How a download is checked
The mod tool and the launcher check an SDK the same way, whatever the base it came from, and refuse it by name at the first step that fails:
SHA256SUMScarries Horizon's signature for the tagsdk-<build id>. That signature never passes for a game release, and a game release's never passes for an SDK.sdk.jsonis the file those sums list, names this build, has a schema and package format the reader knows, and lists only assets of known kinds and codecs under plain file names.- Every other file has the size and SHA-256
sdk.jsongives, checked before it is decoded. An archive unpacks into a temporary folder, renamed into place only when every entry unpacked, and is refused past an unpacked size limit or for any entry that is not a plain file or folder inside it.
An SDK newer than the launcher reads (its schema, package format or Rust) asks for a launcher update; one made with an older Rust than the launcher compiles with asks for a newer game build.