Skip to main content

Module theme_bundle

Module theme_bundle 

Expand description

A theme bundle: a theme document and the painter modules it names (docs/architecture/theming.md, “Theme bundles”).

A bundle is a directory holding theme.json and one <set>.wasm for each painter set the document names that is not built in. Loading it loads each module (crate::part_paint::wasm), registers it under its name, and then reads the document, which may name those sets like the built-in ones. A bundle is never trusted: each module is held to the wasm host’s limits, and the document is validated like any other.

Enums§

BundleError
Why a bundle is not a theme.

Constants§

DOCUMENT
The document’s file in a bundle directory.

Functions§

load
The theme of the bundle whose document is document, taking each painter module it names from module (by set name). Each module is loaded and registered before the document is read.