Expand description
The data root: package zips on disk, the generated manifest that lists them, and the message of the day.
data/rbr/packages/public/codriver/polish/male/Kamil.zip
^game ^dir ^------------ name -----^
data/motd/<lang>.txt
data/manifest.jsonModules§
- derived_
version 🔒 - file_
hash 🔒 - game_
schema 🔒 - Each game’s
<data>/<game>/schema.toml: which categories its catalogue has, published in the manifest with the hash installers compare. - generate 🔒
manifest gen: walk<data>/<game>/packages/<directory>/**/*.zip, hash every zip, merge its sidecar, and collect what the publisher should fix.- generated 🔒
- manifest_
file 🔒 - manifest_
store 🔒 - motd 🔒
- publish_
guards 🔒 - What publishing a new manifest would take away from the live one without
anyone deciding it, which
manifest genrefuses unless told otherwise. - requires_
check 🔒 - sidecar 🔒
- sidecar_
migration 🔒
Structs§
- Generated
- A generated manifest and what the publisher should look at, collected so the CLI prints them together and tests can assert on them.
- Manifest
Store - The published manifest, reloaded when
manifest.json’s mtime changes. - Migration
- What
migrate_to_sidecarsdid.
Constants§
- BUNDLED_
SCHEMAS - The repository’s
schemas/<game>.tomlbyte for byte, which installers of the same release embed too. - DERIVED_
VERSION_ PREFIX - Marks a version derived from a package’s bytes rather than written in a sidecar.
- MANIFEST_
FILE - MOTD_
DIR - The folder beside the games holding
<lang>.txtmessage-of-the-day texts. - MOTD_
FALLBACK_ LANG - PACKAGES_
DIR - The folder under each game that
manifest genscans; anything else in a game folder is ignored. - REPORTS_
DIR - Installers’ conflict reports, beside the games but not one.
- RESERVED_
TOP_ LEVEL - Folders the server keeps beside the games, which
manifest genmust not publish or warn about as games.
Functions§
- derived_
version sha-+ the first 8 hex chars of the sha256: the same on every rebuild and replica, and different for every payload, unlike the old fixed0.0.0.- generate
- A zip outside an access directory or with a broken sidecar is withheld as an
error rather than published with silently wrong metadata; the rest publishes.
A game publishes nothing without a valid
schema.toml, and a package in a category its schema does not declare is skipped. - generate_
with generate, comparing each game’s schema withbundledinstead of this release’s own, so tests’ fixture schemas need not match the repository’s.- is_
chosen_ version - A version a person chose, as opposed to the legacy default or a derived one.
- metadata_
losses - Values the current manifest carries that publishing
nextwould drop, one line per package and field. - migrate_
to_ sidecars manifest migrate-to-sidecars: appends each value the current manifest carries and its package’s sidecar lacks, so a pure regeneration keeps it.- parse_
schema - Validates a schema and hashes its raw bytes, comments included, since that is the hash an installer compares.
- read_
manifest - Reads and validates
manifest.json; a missing file is an empty manifest. - sha256_
bytes - Lowercase hex sha256 of bytes already in memory.
- sha256_
file - Lowercase hex sha256 of a file’s contents, streamed rather than read whole.
- unpublished_
games - Games the current manifest serves that
nextwould take off the server entirely because their schema is missing or broken, typically after an upgrade that did not copyschema.tomlin; a game whose packages all left on purpose keeps its schema and is not listed. - valid_
lang [a-z]{2,8}:langnames a file no manifest lists, so this alphabet is what keeps it inside the motd folder.- write_
manifest - Writes
<data>/manifest.jsonthrough a temp file renamed over it in the same directory, so a crash or a full disk leaves the previous manifest whole and a reloading server never reads half a file. - zip_
file - Where a listed package’s zip lives;
Noneunless every key is valid, so a hand-edited manifest cannot name a path outside the data root.