github opensec-git/Pi-Bolt bolt-v0.3.1
Pi-Bolt 0.3.1 (Pi 1.0.0)

latest releases: bolt-v1.0.9, bolt-v1.0.8, bolt-v1.0.7...
one month ago

Pi-Bolt 0.3.1 inlines array callbacks, knows its own version, updates itself, reports crashes to the right place, and comes with a release pipeline. It runs Pi 1.0.0.

Faster

  • Array callbacks are compiled into the loop around them. forEach, map, filter, reduce, some, every, find and the like, with a closure or a module-level function, no longer make a call per element. In tight loops: forEach 11.5 → 1.9 ms, reduce 21.5 → 1.4 ms, filter 29.7 → 3.1 ms per 300,000 elements (stock Bun's JIT: 1.8, 0.7, 2.2 ms). A Pi session uses 3–6% less CPU.
  • This relies on the standard objects' methods being what they were when the program started, so Pi-Bolt now freezes them: overwriting Array.prototype.map or JSON.parse throws a TypeError; adding methods still works. docs/PLUGINS.md has the details and the switch to turn it off.

Fixed

  • Updates. pi-bolt --version now prints the Pi-Bolt version and build: 1.0.0 (Pi-Bolt 0.3.1, linux-x64, JIT off). The update notice checks Pi-Bolt's releases instead of Pi's, and pi-bolt update installs the latest release in place (or says to use the package manager, for an npm install).
  • Crashes. A crash says "Pi-Bolt has crashed" and links to Pi-Bolt's issues, with the trace on a page at pi-bolt.opensec.in/crash. It used to send people to Bun.
  • Builds with huge literals. Compiling a function above 256 KB of bytecode took minutes and tens of GB. The build now stops at once with a message saying what to do.
  • The installer shows which Pi-Bolt version is installed and offers to update it, and verifies release signatures once releases are signed.

For contributors

  • ci workflow: lint, build Pi with the released runtime, engine tests, end-to-end checks, on every push.
  • release workflow: a bolt-vX.Y.Z tag builds, tests, packages, signs and publishes everything, on a self-hosted runner.
  • upstream workflow: a daily check of Pi's releases that opens a pull request merging a new one.
  • docs/RELEASING.md.

Install

curl -fsSL https://pi-bolt.opensec.in/install.sh | sh

or npm install -g pi-bolt, or bun add -g pi-bolt. From 0.3.0: pi-bolt update.

Asset For
pi-bolt-linux-x64.tar.xz / .tar.gz Recommended. CPUs with AVX2 (Intel Haswell 2013+, AMD Zen+).
pi-bolt-linux-x64-baseline.tar.xz / .tar.gz Any x86-64 CPU.
pi-bolt-linux-x64-jit.tar.xz / .tar.gz JIT also on, for plugins loaded at run time.
pi-bolt-runtime-linux-x64.tar.gz The Pi-Bolt Bun runtime, for compiling plugins in.

Linux x86-64 with glibc 2.17 or later.

Don't miss a new Pi-Bolt release

NewReleases is sending notifications on new releases.