Runtime Extraction & Cache
When a Kiln binary executes, it unpacks embedded server files into an extraction directory.
Default Behavior
Section titled “Default Behavior”By default, files are extracted to the directory containing the binary (path.dirname(process.execPath)).
/app/├── app # Executable binary├── .kiln-extracted # Build stamp hash├── .next/ # Extracted runtime chunks└── node_modules/# Extracted dependenciesCustomizing Extraction Directory (KILN_RUNTIME_DIR)
Section titled “Customizing Extraction Directory (KILN_RUNTIME_DIR)”If you prefer keeping your application directory clean and extracting files to a system temp folder or RAM-backed tmpfs:
On Linux / Docker:
Section titled “On Linux / Docker:”KILN_RUNTIME_DIR=/tmp/app-runtime ./bin/appOn Windows PowerShell:
Section titled “On Windows PowerShell:”$env:KILN_RUNTIME_DIR = "$env:TEMP\app-runtime".\bin\app.exeInstant Warm Restarts
Section titled “Instant Warm Restarts”Kiln writes a .kiln-extracted file containing the deterministic SHA-256 build hash. On subsequent runs:
- It reads
.kiln-extracted. - Matches the hash with the binary’s embedded build stamp.
- Skips extraction entirely and boots immediately.
