Pack structure
Target API: 5 · Target build:
bbb6l5(2026-11-20, production and preprod) · Status: Verified
Distribution format
- Format: a single
.zip, or a folder (folder loading is desktop browsers only) - Contents: one
pack.json(at the top level of the pack; case-insensitive) + 1–256.wgslfiles - Multiple
.wgslfiles are concatenated into one module, so splitting and subdirectories are free. No constraints on file names. Concatenation happens in dictionary order by path name (module-scope declarations are order-independent, so this only matters for code depending onvarinitialization order). Non-.wgslfiles (READMEs etc.) are ignored
Size and format limits
| Item | Limit | Message when exceeded |
|---|---|---|
| zip size | 32 MB | The zip is over 32 MB. |
| zip entries | 1,024 | The zip has more than 1024 entries. |
pack.json size | 64 KB (UTF-8) | pack.json is over 64 KB. |
.wgsl file count | 256 | The pack has more than 256 .wgsl files. |
total .wgsl source | 256 KB (UTF-8) | The pack's .wgsl files are over 256 KB in total. |
| zip shape | no zip64 / split / encrypted; store or deflate; no duplicate paths | each rejected with its own message |
All files must be valid UTF-8.
Zipping tips
A zip that stores everything under one common root folder has that prefix stripped automatically (macOS “Compress” works as-is; __MACOSX, ._-prefixed files and .DS_Store are excluded automatically). Stray files at the root level break top-level detection, so the safest method is to zip pack.json and the .wgsl files directly (verify pack.json ends up at the zip root).