@insanitybit/bun-prewarm
v0.0.1
Published
Prewarm Bun runtime state inside a Firecracker VM before snapshotting
Readme
bun-prewarm
Prewarm Bun runtime state inside a Firecracker VM before snapshotting.
Purpose
This package warms Bun-related filesystem, binary, and runtime state so that after snapshot restore, Bun startup and first-execution latency are lower.
Installation
npm install -g @insanitybit/bun-prewarmUsage
Run explicitly during VM snapshot build:
bun-prewarm
# then snapshot the VMWhat it does
- Runs
bun --versionto fault the Bun binary into memory - Executes a small JS workload under Bun to warm parsing and runtime
- Runs
bun install --no-saveto warm package manager code paths
Requirements
- Bun must be installed and available on
$PATH - Linux environment (Firecracker VM)
- Node.js 18+ (for running the prewarm script itself)
