Build Modes
VeloxKit has three build modes, each with different trade-offs.
Snapshot (default)
veloxkit build
veloxkit packageThe default and recommended mode for distribution. Generates a V8 heap snapshot at build time.
Characteristics:
- ~50ms cold startup
- Slightly larger output (snapshot blob + assets)
- Requires a build step before packaging
- Best for: production apps, public distribution
Bundle
veloxkit build --mode bundleBundles your app code as a plain JavaScript file without snapshot generation.
Characteristics:
- ~150–300ms cold startup (V8 parses on first launch)
- Smaller blob, faster build
- Useful for: CI, testing, apps that ship very rarely
Portable
veloxkit build --mode portableProduces a zip containing the runtime binary + your app blob as separate files. The binary loads the blob from the same directory on startup.
Characteristics:
- Same startup as snapshot mode
- Blob can be updated independently of the runtime
- Useful for: auto-updater workflows where only app code changes
Dev server
veloxkit devNot a build mode — the dev server bypasses snapshot generation entirely and uses hot module replacement. See Hot Reload for details.
Comparison
| Mode | Startup | Build time | Output size | Use case |
|---|---|---|---|---|
| Snapshot | ~50ms | ~15s | ~20MB | Production |
| Bundle | ~200ms | ~3s | ~20MB | CI / testing |
| Portable | ~50ms | ~20s | ~21MB | Auto-updater |
| Dev | ~200ms | None | N/A | Development |