Skip to main content

Module ecosystem

Module ecosystem 

Source
Expand description

Ecosystem-schema: games, mod loaders, and install rules. The Thunderstore ecosystem schema: games, mod loaders, and install rules.

This mirrors Thunderstore’s upstream ecosystem schema — the same data that drives r2modman — rather than a bespoke normalized copy. Each game carries one or more profiles (r2modman[]) with a LoaderKind, recursive InstallRules that route a package’s files, and metadata (executables, store distributions). A top-level ModloaderPackage registry names every package that is a loader pack (and the subfolder of it that unpacks to the root), so the engine never hard-codes per-game loader facts.

The canonical source is the Thunderstore ecosystem schema, published as JSON at DEFAULT_ECOSYSTEM_URL. A compressed snapshot is embedded at compile time as a fallback (Ecosystem::bundled); Ecosystem::fetch_latest refreshes it from the network. Parsing is intentionally defensive (#[serde(default)], unknown loaders/tracking methods fall back to Other) because this is an external, evolving contract.

Structs§

Distribution
A store distribution: which platform lists the game and under what id.
Ecosystem
A parsed ecosystem schema: the known games plus the mod-loader package registry.
GameDef
A single game’s definition.
GameProfile
A per-manager profile for a game: its loader, install rules, and metadata.
InstallRule
A single, possibly nested, routing rule for a regular mod’s files.
Meta
Display metadata (name and icon) attached to a game or profile.
ModloaderPackage
A package that is itself a mod-loader pack.

Enums§

InstanceType
Whether a GameProfile targets the game itself or a dedicated server.
LoaderKind
The mod-loader family. Unknown values deserialize to LoaderKind::Other.
TrackingMethod
How files matched by an InstallRule are placed and tracked under its route.

Constants§

DEFAULT_ECOSYSTEM_URL
The default URL used by Ecosystem::fetch_latest to refresh the snapshot.