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):
<workspace>/<schemas_dir>/<name>/— workspace-level shared schemas (optional; when the caller supplies a workspace path)<workspace>/.memstead.cache/schemas/<name>-<version>/— cache extracted from a previously loaded archive (workspace-wide)- 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§
- Schema
Source File - One source file destined for the archive’s
.memstead/schema/tree.
Enums§
Functions§
- collect_
schema_ source - Resolve the schema pinned by
schema_refto a sorted set of source files ready to embed under.memstead/schema/in a mem archive.