Home > Engineering > Bare Runtime > Global API
The Bare global is available without import. There
is no process or Buffer global — those require
explicit modules.
Bare.platform — "linux", "darwin",
"win32", "android", "ios"Bare.arch — "x64", "arm64", "arm",
"ia32", "mips", "mipsel", "riscv64"Bare.simulator — boolean, true if compiled for
simulatorBare.argv — command line argumentsBare.pid — process IDBare.exitCode — exit code (used if exit()
called without argument)Bare.version — version stringBare.versions — object with dependency versionsBare.suspended — boolean, current suspension
stateBare.exiting — boolean, whether process is
exitingBare.exit([code]) — immediately terminateBare.suspend([linger]) — suspend process and
all threads (mobile lifecycle)Bare.wakeup([deadline]) — wake during
suspension for limited workBare.idle() — immediately suspend event loopBare.resume() — resume after suspensionuncaughtException — unhandled JS exceptionunhandledRejection — unhandled promise rejectionbeforeExit — loop out of work, chance to
schedule moreexit — process exiting (must not schedule work)suspend — process suspending (defer/cancel work)wakeup — waking during suspensionidle — idle after suspension (loop will block)resume — resuming (restart deferred work)Lightweight threads with synchronous joins and SharedArrayBuffer support.
Bare.Thread.isMainThread — booleanBare.Thread.self — current thread referencenew Bare.Thread(filename[, options]) — spawnthread.join() — synchronous waitthread.suspend() / thread.resume() /
thread.terminate()Native addon loading.
Bare.Addon.resolve(specifier) — resolve pathBare.Addon.load(specifier) — load addonBare.Addon.host — platform-arch stringBare.Addon.cache — loaded addon cacheOptional streaming communication with embedder. Returns a Duplex stream or null if not embedded.
Source: https://github.com/holepunchto/bare and https://docs.pears.com/reference/api.html
© 2026 In Wonder - The World of Splectrum, Jules ten Bos. The conversation lives at In Wonder - The Conversation.