.hsdz: compiled package
An .hsdz file is a compiled .hsda document, packed into one binary file.
It is what gets loaded into a space.
The format may change between releases.
Build
The hsd commands on this page run from the unavi workspace.
hsd build --input <file.hsda> --out-dir <dir>
The output is named after the source's folder, so unavi-spawner/asset.hsda builds unavi_spawner.hsdz.
Building does the following:
- Writes each prim as the entries a live document contains.
- Gives each prim a stable id, from the source path and its place in the tree.
- Compiles each
scriptcrate to WebAssembly and embeds it. - Builds each
referenceas a separate document inside the same package.
A package carries everything it needs, including meshes, images, and scripts. Once loaded, that content is stored by hash, so the same mesh is only stored once.
Limits
A package is refused if it breaks any of these limits.
| Limit | Value |
|---|---|
| One entry | 32 MiB |
| Whole package | 256 MiB |
| Documents in one package | 256 |
Inspect
hsd dump prints a package as .hsda-style RON.
Large content like scripts and meshes shows as a byte count.
hsd dump <file.hsdz>
A dump is for reading only. It can't be built again, since compiling replaced every path with its content.