- Add BARE_OS_BOOT_SAFE_MODE, BOOT_TRANSACTION_JOURNAL, BOOT_CHECKPOINT in stock kernel; kernel.ext.d requires/after/before ordering; boot-ready subsystems.kernel.giantPhase adjunct - Expose /proc/bare_os/giant_phase_program.json via bare-os-giant-phase; wire VFS, baretop snapshot, and ctx batch read - Add /bin/kernel-doctor and /bin/kernel-explain; verify-giant-phase-doc in pretest; giant-phase-benchmark-harness stub - Bump bareOsCtxApiVersion to 1.23.0; sync seeder kernel/init.js and runtime caps; extend booter tests for proc listing and safe mode Docs: giant-phase-kernel-program.md, feature-roadmap, kernel-extensions, compatibility-matrix, environment appendix, handbook 06/11, developer guide, users-manual 07, scripts README; booter CHANGELOG
/lib/bare (system image)
Self-contained ctx.bare support on the system Hyperdrive: Holepunch Bare packages bundled as IIFE scripts the booter can execute without a traditional Node module graph on the drive.
Documentation: Developer guide ch.12 · bare-os-bare-libs package README.
On this page
- What gets staged
- Boot order: drive bundles vs host imports
- Environment toggles
- Trust model
- Regenerating bundles
- When builds fail (stubs)
What gets staged
bare-module-manifest.json— Copy of the booter manifest (same keys and packages as host resolution). Tells the runtime which logical module names exist.manifest.json— Drive loader index:bundleslists IIFE paths that assign intoglobalThis.__bare_os_stdlib__;bundleStatssummarizes esbuild success versus stub-only placeholders (per-entry success/failure counts and paths).bundles/*.js— One file per manifest row. Successful builds are full IIFE bundles; failures are no-op stubs (see the file header comment). Regenerate withnpm run build -w bare-os-bare-libs.
At boot the booter runs drive bundles first, then (unless BARE_OS_BARE_HOST_IMPORTS=0) fills any missing keys via host import() so development iterations can patch a single package without re-seeding the entire drive.
Boot order: drive bundles vs host imports
- Seeded bundles win for keys they actually populate — they are part of the trusted image, same class as
/bin. - Host imports run only for keys still missing after bundle evaluation, keeping local checkout workflows fast.
- Disabling host imports (
BARE_OS_BARE_HOST_IMPORTS=0) approximates production Pear behavior where only the drive contents exist.
Environment toggles
The authoritative list is in the environment appendix. Names that operators mention most often alongside /lib/bare:
BARE_OS_BARE_HOST_IMPORTS— Set to0/falseto forbid hostimport()fallback (drive-only resolution).- Related Pear
ctx.baretoggles and HTTP allow lists are documented in PEAR-RUN.md and the booter package reference.
Trust model
Trusted image only: executing these bundles is equivalent to running seeded /bin utilities. Do not copy arbitrary third-party IIFEs into kernel/lib/bare/bundles/ without reviewing them the same way you would review a new setuid binary on a Unix system.
Regenerating bundles
- Edit
packages/bare-os-booter/lib/bare-module-manifest.jsonor bundle sources underpackages/bare-os-bare-libs/as needed. - Run
npm run build -w bare-os-bare-libs— output lands inkernel/lib/bare/(and CI expectspackages/bare-os-seeder/kernel/to matchkernel/byte-for-byte afterward). - Re-run the seeder so peers replicate the updated system drive.
When builds fail (stubs)
If bundleStats shows failures, open the corresponding bundles/*.js stub: the header usually names the missing dependency or unsupported pattern. Fix the catalog entry, adjust esbuild options in packages/bare-os-bare-libs/build.mjs, or mark the module optional in the manifest until the ecosystem catches up. npm run smoke:bare-manifest guards required imports listed in the manifest smoke list.
Note: This file is copied to kernel/lib/bare/README.md (and the vendored seeder tree) by bare-os-bare-libs build. Links are written for the kernel/lib/bare/ path; verify-doc-links skips this template path because its on-disk location differs.