LogoPear Docs
ReferencesModules

Bare modules

Catalog of `bare-*` runtime modules that supply Bare's standard-library functionality (process, fs, net, crypto, streams, …), grouped by area.

Bare modules

Pear's native runtime is Bare—a small, modular JavaScript runtime for desktop and mobile. The Bare global API is minimal and not intended as a standard library; standard runtime functionality is provided via installable modules prefixed with bare-. The modules below are grouped by area; within each group they're ordered roughly from foundational to specialized.

To run a script on Bare directly, see the bare CLI. To embed a Bare core inside a native app, see Bare Kit and One core, many platforms.

If you author native addons for Bare, the Bare native-addon prebuild actions build and collect prebuilt binaries across platforms in CI.

Modules & packaging

The module system, bundling, and packaging tools.

ModuleDescriptionSystemsStability
bare-moduleModule support for JavaScript — reference
stable
bare-module-lexerHeuristic lexer for detecting imports and exports in JavaScript modules
stable
bare-bundleApplication bundle format for JavaScript
stable
bare-packBundle packing for Bare—traverse a module graph into an embeddable bundle
stable
bare-unpackBundle unpacking for Bare
stable
bare-makeOpinionated CMake-based build system generator for native addons — reference
stable
bare-buildPackage a Bare app as native bundles or standalone executables
stable
bare-runtimePrebuilt Bare binaries for macOS, iOS, Linux, Android, and Windows
stable
bare-semverMinimal semantic versioning library for Bare — reference
stable
bare-realmRealm support for Bare
stable
bare-typeCross-realm type predicates for Bare
stable

Threads, events & processes

Concurrency primitives, the event system, and process control.

ModuleDescriptionSystemsStability
bare-workerHigher-level worker threads for JavaScript
stable
bare-channelInter-thread messaging for JavaScript — reference
stable
bare-atomicsNative synchronization primitives for JavaScript — reference
stable
bare-eventsEvent emitters for JavaScript
stable
bare-queue-microtaskMicrotask queuing for Bare
stable
bare-timersNative timers for JavaScript
stable
bare-hrtimeHigh-resolution timers for JavaScript
stable
bare-signalsNative signal handling for JavaScript
stable
bare-daemonCreate and manage daemon processes in JavaScript
stable
bare-subprocessNative process spawning for JavaScript — reference
stable
bare-processNode.js-compatible process control for Bare
stable
bare-threadThread support for Bare
stable

File system & OS

Filesystem access, paths, environment, and terminal I/O.

ModuleDescriptionSystemsStability
bare-fsNative file system for JavaScript — reference
stable
bare-pathPath manipulation library for JavaScript
stable
bare-osOperating system utilities for JavaScript — reference
stable
bare-envEnvironment variable support for JavaScript
stable
bare-pipeNative I/O pipes for JavaScript — reference
stable
bare-ttyNative TTY streams for JavaScript
stable
bare-tuiA little TUI framework for Bare, based on bubbletea
stable
bare-readlineLine editing for interactive CLIs with command history
stable
bare-ansi-escapesParse and produce ANSI escape sequences
stable

Networking

Sockets, transport security, HTTP, and RPC.

ModuleDescriptionSystemsStability
bare-tcpNative TCP sockets for JavaScript — reference
stable
bare-dgramNative UDP for JavaScript
stable
bare-dnsDomain name resolution for JavaScript
stable
bare-http1HTTP/1 library for JavaScript
stable
bare-httpsHTTPS library for JavaScript
stable
bare-tlsTransport Layer Security (TLS) streams for JavaScript — reference
stable
bare-wsWebSocket library for JavaScript
stable
bare-fetchWHATWG Fetch implementation for Bare — reference
stable
bare-form-dataForm data support for Bare — reference
stable
bare-urlWHATWG URL implementation for JavaScript — reference
stable
bare-rpclibrpc ABI compatible RPC for Bare — reference
stable
bare-netTCP and IPC servers and clients for JavaScript
stable
bare-ipcLightweight pipe-based IPC for Bare — reference
stable
bare-zmqLow-level ZeroMQ bindings for JavaScript
stable

Data, streams & encoding

Buffers, streaming, cryptography, and serialization.

ModuleDescriptionSystemsStability
bare-bufferNative buffers for JavaScript
stable
bare-streamStreaming data for JavaScript — reference
stable
bare-cryptoCryptographic primitives for JavaScript — reference
stable
bare-encodingWHATWG text encoding interfaces for JavaScript
stable
bare-structured-cloneStructured cloning algorithm for JavaScript — reference
stable
bare-zlibStream-based zlib bindings for JavaScript
stable

Diagnostics & console

Logging, inspection, assertions, and the REPL.

ModuleDescriptionSystemsStability
bare-consoleWHATWG debugging console for JavaScript — reference
stable
bare-inspectInspect objects as strings for debugging
stable
bare-inspectorV8 inspector support for Bare — reference
stable
bare-loggerLow-level logger for Bare with system log integration
stable
bare-performancePerformance monitoring for Bare
stable
bare-assertAssertion library for JavaScript
stable
bare-abortCause abnormal program termination and generate a crash report
stable
bare-formatString formatting for JavaScript
stable
bare-replRead-Evaluate-Print-Loop environment for JavaScript
stable

Media

Audio, video, and image formats for Bare apps.

ModuleDescription
bare-ffmpegLow-level FFmpeg bindings for Bare
bare-mediaA set of media APIs for Bare
bare-pngPNG support for Bare
bare-jpegJPEG support for Bare
bare-gifGIF support for Bare
bare-webpWebP support for Bare
bare-heifHEIF support for Bare
bare-tiffTIFF support for Bare
bare-bmpNative BMP codec for Bare
bare-icoICO support for Bare
bare-svgSVG support for Bare
bare-exifEXIF metadata support for Bare
bare-image-resampleImage resampling support for Bare

Native development kits

For embedding a Bare core inside a native application rather than running it standalone, use the toolkits below. They're documented in the Bare Kit reference and the One core, many platforms explanation.

ProjectDescription
bare-kitBare for native application development—worklets and IPC for iOS and Android
react-native-bare-kitbare-kit for React Native
bare-expoExample of embedding Bare in an Expo application
bare-iosExample of embedding Bare in an iOS application
bare-nativeNative application development framework for Bare

The sections below catalog the rest of the published bare-* modules. They're listed by area without the platform/stability matrix above—per-module platform support and stability are tracked in each repository (and in the project's module research dossier).

Node.js compatibility

Shims and compatibility layers that map Node.js APIs and globals onto Bare. See also bare-node as the umbrella entry point.

ModuleDescription
bare-nodeCompatibility modules for Node.js builtins in Bare
bare-node-runtimeCompatibility layer for Node.js builtins and globals in Bare
bare-vmIsolated JavaScript contexts for Bare
bare-async-hooksasync_hooks shim for Bare
bare-abort-controllerAbort controller support for Bare
bare-querystringURL query-string utilities
bare-http-parserStreaming HTTP request and response parser for Bare
bare-utilsNode.js-compatible utility functions for Bare
bare-intlECMAScript Internationalization API for Bare
bare-compat-napiBare compatibility headers for Node-API
bare-string-decoderstring_decoder shim for Bare
bare-punycodePunycode support for Bare

Module system, build & packaging

Module resolution and traversal, addon linking and prebuilding, and bundle/app packaging.

ModuleDescription
bare-module-resolveLow-level module resolution algorithm for Bare — reference
bare-module-traverseLow-level module graph traversal for Bare — reference
bare-addon-resolveLow-level addon resolution algorithm for Bare — reference
bare-addonNative addon template for Bare
bare-linkNative addon linker for Bare
bare-prebuildRecursively prebuild installed native addons from source
bare-bootBoot drives in Bare
bare-runCross-platform script runner for Bare
bare-whichFind a program in $PATH
bare-openCross-platform application launcher for Bare
bare-storageMinimal, cross-platform directory locator for Bare
bare-pack-drivePack drives to Bare bundles
bare-bundle-compileCompile a bundle of CommonJS modules to a single module
bare-union-bundleCombine multiple bundles into a union bundle — reference
bare-stowModule bundling and harness generation for Bare
bare-distributableTemplate for creating custom Bare distributables
bare-apkAPK packaging tools for Bare — reference
bare-app-imageAppImage packaging tools for Bare

Native bindings

Bindings to native libraries and platform capabilities. Several are platform-specific (the name indicates the target).

ModuleDescription
bare-sqliteSQLite bindings for Bare — reference
bare-sqlite-vectorSQLite vector-search bindings for Bare
bare-sdlSDL bindings for Bare — reference
bare-bluetooth-androidAndroid Bluetooth bindings for Bare — reference
bare-bluetooth-appleApple CoreBluetooth bindings for Bare — reference
bare-posixPOSIX-specific bindings for Bare — reference
bare-stdioStandard input/output streams for Bare
bare-xdifflibxdiff bindings for Bare
bare-deltaBinary patch handling for Bare
bare-md4cMD4C markdown push-parser bindings
bare-system-loggerSystem logger for Bare

Logging, metrics & testing

ModuleDescription
bare-prom-clientPrometheus metrics client — reference
bare-diagnostics-channelPublish data to named diagnostics channels
bare-debug-logSimple debug log for JavaScript
bare-file-loggerFile-system logger for Bare
bare-covGenerate coverage reports using Bare and Node.js
bare-tapMinimal TAP test library for Bare

Terminal UI

Extensions for bare-tui, the terminal-UI framework.

ModuleDescription
bare-tui-formDeclarative form builder for bare-tui
bare-tui-paparamMenu/form helper for paparam CLIs
bare-tui-markdownLimited markdown renderer for bare-tui

Other utilities

ModuleDescription
bare-sidecarStart and manage Bare sidecar processes from Node.js and Electron — reference
bare-broadcast-channelMulti-producer, multi-consumer inter-thread broadcast messaging — reference
bare-type-stripperStrip TypeScript type syntax to produce plain JavaScript
bare-node-fetchCross-runtime fetch module
bare-mdns-discoveryMulticast DNS (mDNS) service discovery for Bare — reference
bare-mimeMIME-type parsing for Bare — reference

See also

On this page