Skip to content

Reading a manifest

Generated from engine/assets/asset_manifest_loader.h at 0f4f503. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.

Browse the assets module

Audience: game code.

#include "engine/assets/asset_manifest_loader.h" · namespace labrador

AssetManifest read_asset_manifest(const char* json_path);

Reads the manifest at json_path.

The file groups assets by kind and directory, because that is how a person reads them:

{
"assets": [
{
"kind": "font",
"directory": "./fonts/",
"names": [ "jetbrains_mono_bold_16" ]
}
]
}

and the groups are flattened to one entry per asset, because that is how a loader walks them. Order survives the flattening: assets load in the order the file lists them.

Throws std::runtime_error naming the path if the file cannot be read or parsed, and naming the path and the offending group if the document is the wrong shape or has an unknown key. The document accepts only assets; each group accepts kind, directory, names and optional (default false). Asset kinds and names remain game-defined values. A manifest is hand-edited data, so every read here is checked rather than assumed (T6).

Named in the public declarations above: AssetManifest.

The files that include this header directly. A file can also reach it through another header.

No guide or concept page links to this header yet.

Documentation for Labrador v0.3.0. Built from Labrador 0f4f503 of 2026-11-03.

All documentation versions