Distribute as a binary
Ship a Pear application as a small bootstrap binary that pulls the latest version from the swarm. One binary serves every future release.
The default Pear distribution model assumes users already have the pear runtime installed; they open pear://<your-link> to launch your application. For users who don't — or for app stores that want a self-contained download — Pear supports compiling a small bootstrap binary that pulls the platform and the application from the swarm at first launch. For why this stays small, see Storage and distribution.
The binary is bootstrap-only: it doesn't ship the application's code or assets, only the references needed to fetch them. Once a user has run any version, future releases reach them via the swarm without recompilation — the same delivery channel covered in Deploy your application.
Steps
-
Clone the
pear-applingtemplate repository. It's a CMake-based project that produces native binaries for macOS, Linux, and Windows from one source tree. -
Edit
CMakeLists.txtwith your application metadata. Application name,pear://link, identifier, version, and platform-specific signing inputs all live in this single file. See the template's README for the full property list. -
Compile per platform. The template documents the toolchain expectations (Xcode, MSVC, gcc) and the CMake invocations for each. Output is one small binary per platform — typically a few MB — that bootstraps Pear when launched.
-
Distribute the binary via your channel of choice (GitHub Releases, an MSI/dmg, an app store, a download link). End users run it; on first launch it replicates the Pear platform and your application, then runs it. On subsequent launches, the swarm delivers any new version of the application — usually no recompile or redistribution is needed.
When this is the wrong tool
- For users who already run Pear,
pear://<your-link>is the lighter path: zero compilation, instant updates. - For mobile distribution, see the platform-specific paths under Bare modules (Bare iOS / Bare Android) —
pear-applingtargets desktop OSes.