-
Notifications
You must be signed in to change notification settings - Fork 0
Packaging
Enoch-199811 edited this page Aug 9, 2026
·
1 revision
Compiled products can be bundled into a single distributable package:
bio pack <out.img|.zip> [--entry NAME] <files...>
bio unpack <pkg> [dir] # extract a package
bio run pkg.img # run a package directly (executes its entry)
bio run pkg.zipA custom raw image format (BIOIMG1, version 2):
- Small directory header followed by the files' bytes written directly — no compression, fully seekable, extremely fast to pack and run.
- File permissions are stored — unpacked executables keep their executable bit (older v1 images without the mode field still read fine).
A standard zip archive, written and read natively:
- No external
zip/unziptools required — works on every platform (including Windows). - Uses the STORE method (no compression); unix permission bits are recorded in the external attributes.
- When the system
unzipis present it is used for unpacking, so legacy deflate archives still open.
--entry NAME marks which packed file is the runnable entry point (a compiled
executable from bio shell build); bio run executes it. For zip packages
without an explicit entry, the first file is executed.
bio build -m produces a complete package in one step — the app binary plus
the current platform's CLI and shared runtime:
bio build examples/project -m # → bin/<project>.img
bio build examples/project -m dist.zip # → dist.zipmake bin (via tools/make-dist.sh) cross-compiles release trees for all
supported platforms with zig (no foreign SDKs needed):
bin/<platform>/bin/bio(.exe) launcher (dynamically linked)
bin/<platform>/lib/ shared runtime (libbio.so / bio.dll / libbio.dylib) + deps
Platforms: linux-x86_64, linux-arm64, win32, win64, win-arm64,
macos-x86_64, macos-arm64. Requires zig (>= 0.14) on PATH.
- Home
- Beginner — first steps
- Intermediate — real usage
- Advanced — masterclass
- Build & Run
- Packaging
- Language-Reference
- BR-Model
- BTM-Model