Skip to main content

Module source

Module source 

Source
Expand description

Schema source-file collection for publishing mem archives.

A published .mem archive is portable only if the schema it pins travels inside it — otherwise opening the archive on a foreign machine without the matching schema registered would fail at resolve time. collect_schema_source resolves a SchemaRef to the raw YAML bytes callers need to zip into the archive’s schema/ tree.

Resolution order (first match wins):

  1. <workspace>/<schemas_dir>/<name>/ — workspace-level shared schemas (optional; when the caller supplies a workspace path)
  2. <workspace>/.memstead.cache/schemas/<name>-<version>/ — cache extracted from a previously loaded archive (workspace-wide)
  3. Embedded built-in (via include_dir!) — ships inside the binary

In every case the manifest’s declared version is checked against the pin; a name collision at the wrong version falls through rather than silently embedding a mismatched schema.

Structs§

SchemaSourceFile
One source file destined for the archive’s .memstead/schema/ tree.

Enums§

SchemaSourceError

Functions§

collect_schema_source
Resolve the schema pinned by schema_ref to a sorted set of source files ready to embed under .memstead/schema/ in a mem archive.