pub fn export_mem_to_bytes(
mem_dir: &Path,
config: &MemConfig,
workspace_root: Option<&Path>,
workspace_schemas_dir: Option<&Path>,
explicit_name: &str,
) -> Result<MemExportBytes, MemExportError>Expand description
Produce a portable .mem archive as bytes for a folder-backed
mem. Same wire format as export_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.
explicit_name is the mem name the publish whitelist receives.
Callers reaching this through crate::Engine::export_mem_to_bytes
pass the mount’s mem name; callers reaching it directly choose
the disk basename or a config-supplied alias.