.hsdz: compiled package
An .hsdz file is a compiled .hsda scene
packed into a single self-contained binary archive. This is the format loaded
into spaces.
The format is not version-locked and may change between releases.
Build
Run hsd from the unavi workspace to compile an .hsda source file:
hsd build --input <file.hsda> --out-dir <dir>
Output files are named after the parent directory of the input file, so
unavi-spawner/asset.hsda produces unavi_spawner.hsdz.
During compilation, hsd build:
- Serializes each prim into the key-value entries used by live HSD documents.
- Derives a deterministic ID for every prim from its source path and tree position.
- Compiles each referenced
scriptcrate to a WebAssembly component and embeds the binary. - Builds each
referenceinto its own embedded document inside the archive.
The resulting package bundles every mesh, texture, and script it depends on. Once loaded into a peer, those assets are content-addressed in iroh-blobs, automatically deduplicating shared meshes and images.
Limits
The loader rejects any package that exceeds these limits:
| Limit | Value |
|---|---|
| Single entry | 32 MiB |
| Total package size | 256 MiB |
| Documents per package | 256 |
Inspect
Use hsd dump to print the contents of a package in .hsda-like RON syntax:
hsd dump <file.hsdz>
Large binary blobs such as meshes and compiled scripts appear as byte counts. The dumped output is for inspection only and cannot be rebuilt directly, because compilation inlines referenced files.