- Bump /proc/bare_os/syscalls.json to schema 7; socketMsgSurface (sendmsg/recvmsg ENOTSUP) - POSIX profile 1.0.8; align syscalls.example.json, declared profile, compatibility matrix - Bridged SOCK_DGRAM recv/recvfrom with bounded queue + poll/select readiness env knobs - process_table.json schema 7; fdModel.processTableSchema and matrix/dashboard sync - posix-conformance-matrix bareOsSyscallOps includes recvfrom P2P / protocol / replication - Optional Protomux bare-os-app-v1 (BARE_OS_PROTOMUX_APP_CHANNEL) - Replication: guestReplicationPlan (BARE_OS_REPLICATION_PLAN_JSON), sync_window parallelismHint - Blind-relay swarm protomuxBackpressure (BARE_OS_SWARM_PROTOMUX_BACKPRESSURE_COUNT) - Remove bareOsProcBlindPeerRelayHintsStub; strict peer allowlist (BARE_OS_PEER_ALLOWLIST_STRICT) - Kernel multisig gate before kernel.ext.d; Pear updater integrationHints + audit env docs Tooling / tests / hygiene - Default holepunch clone drift in pretest; document BARE_OS_HOLEPUNCH_DRIFT_CHECK=0 - Widen bare holepunch catalog overrides; Mermaid architecture in docs hub + README link - Fix tests: corestore_snapshot proc schema 2, posixXsh schema 2, awk-engine export strip in xcu sweep - pear-updater-bridge: shared integration hints; identity-session import order - Handbook ch.3/7/9 + environment appendix updates; scripts README drift script behavior
/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__;bundleStatscounts attempted bundles;bundleDiagnosticslists each bundle’s byte size (same data asdocs/audit/bundle-health.json).bundles/*.js— One esbuild IIFE per catalog entry. The bare-libs build is fail-fast (esbuild errors abort; no stub placeholders). Stale*.jsleft from older tiered builds are pruned on each successful build. Regenerate withnpm run build -w bare-os-bare-libs(updatesdocs/audit/bundle-health.json).
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
Esbuild prints the failing ctxKey and package. Fix bare-module-manifest.json, adjust build.mjs (plugins, platform), or mark the entry optional / bundle: false when host-only resolution is intended. npm run smoke:bare-manifest guards required imports listed in the manifest smoke list.
CI: scripts/verify-bundle-health.mjs checks docs/audit/bundle-health.json against on-disk sizes; scripts/verify-bundle-markers.mjs and scripts/verify-bundle-throws.mjs gate incomplete-looking substrings / Error messages. scripts/sanitize-bare-bundles.mjs (run from this build) normalizes known upstream HTTP helpers, stream-base-class messages, and ICO encode paths so docs/audit/bundle-marker-allowlist.json and docs/audit/bundle-throw-allowlist.json stay empty.
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.