Using Bare on its own
Bare is a general-purpose JavaScript runtime you can adopt without Pear—embeddable, cross-platform, and modular. Here's when that makes sense and where the runtime-only path goes.
Most of these docs assume you're building on Pear, the peer-to-peer platform. But Bare—the runtime underneath Pear—is a general-purpose JavaScript runtime in its own right, and you can adopt it on its own, with no peer-to-peer or Pear machinery at all. This page is the entry point for that runtime-only path.
When to reach for Bare alone
Use standalone Bare when you want:
- A runtime to embed in a native app. Run JavaScript logic inside an iOS, Android, or React Native app on a background thread—the "run JavaScript everywhere" case—via Bare Kit worklets.
- A modular Node.js alternative. Bare is mobile-first and ships almost no standard library; you opt into only the
bare-*modules you actually use, keeping bundles small. - A single standalone executable. Compile a CLI, service, or daemon into one binary with no Node.js, Bare, or Pear install required on the user's machine.
If instead you're building a peer-to-peer app—storage, replication, swarms, over-the-air updates—start with Pear rather than Bare directly: Getting started and The Pears stack show how Bare fits underneath it.
The runtime-only path
Understand it
- Inside Bare—what the runtime is, its lifecycle, and why its standard library is opt-in.
- One core, many platforms—embedding a Bare core in native apps via worklets and a typed RPC seam.
Look it up
- Bare runtime API—the
Bareglobal: process properties, lifecycle, addons, threads. - Bare CLI—run a script or start a REPL with the
barecommand. - Bare Kit—the Worklet and IPC API for iOS, Android, and React Native.
- Bare modules—the
bare-*standard library.
Do it
Where Bare and Pear meet
Even used on its own, Bare shares an ecosystem with Pear. The peer-to-peer building blocks are ordinary JavaScript modules that run on Bare, and tools like compact-encoding and hyperschema are used on both sides. So if a standalone Bare app later grows peer-to-peer features, the same core moves onto Pear unchanged—see The Pears stack.