Expand description
Mem-archive export.
The folder-shaped export (the gix-free path) lives here so the
unified Engine::export_mem can call it without crossing into
memstead-git-branch. The git-branch-shaped variant
(export_mem_from_branch) stays in memstead-git-branch::ops::export
because it walks a gitdir.
Output wire shape is deterministic and matches the git-branch
variant byte-for-byte for equivalent input: .memstead/config.json
carries the whitelist-projection of the author’s MemConfig,
.memstead/schema/ embeds the pinned schema’s source files, and the
mem’s .md blobs land at their mem-relative paths. Entries are
sorted by path and zip-stamped with a fixed mtime so identical
input produces byte-identical archives.
Structs§
- MemExport
Bytes - Byte-shaped output of
export_mem_to_bytes. Bundles the produced archive bytes with the same metadataMemExportResultreports for path-based exports.
Enums§
Functions§
- build_
archive_ provenance - Build the per-entity authoring-provenance payload from a backend’s
mutation log (
read_provenance). Keys by each entity’s mem-relative path (EntityId::path) so the payload survives a remount under a different mem name. For each entity, keeps the most recent record that carries a non-empty note — the entity’s current rationale. - export_
entries_ to_ bytes - Seal already-collected entity bytes into a portable
.memarchive — the storage-agnostic core shared by the folder exporter (export_mem_to_bytes, which walks a directory) and the in-memory exporter (which lists entities from acrate::backend::MemBackendholding them in RAM). Same wire format either way: whitelist config projection, embedded schema source, deterministic path-sorted entries, fixed mtime, and the same pre-write lenient validation pass. - export_
mem - Export a mem directory as a portable
.memarchive. - export_
mem_ to_ bytes - Produce a portable
.memarchive as bytes for a folder-backed mem. Same wire format asexport_mem— same whitelist projection, same embedded schema source, same deterministic sort order and fixed mtime — but the output stays in memory so the bridge / WASM consumers can return it directly over HTTP.