Repolode
blackboardsh

blackboardsh/electrobun

Cross-platform desktop app framework for building small, fast apps with TypeScript in the main process and webviews, with Zig, Rust, Go, or Odin also supported.

Open-source alternative to:Electron

Stars
12,939
Forks
374
Open issues
146
Last commit
2 days ago

What is it?

Electrobun is a framework for building, updating, and shipping cross-platform desktop applications. Application logic runs in a Bun-based main process written in TypeScript, while the UI is rendered in isolated webviews. Typed RPC connects the two processes, so developers can keep main and webview code in one codebase with type safety.

The project focuses on small app size and efficient updates. Its self-extracting bundles use Zstandard compression, and updates are delivered as binary patches (BSDIFF) with a fallback to a compressed full download. A bundleCEF option pins Chromium for consistent rendering at the cost of larger files, and a bundleWGPU option lets TypeScript drive a native GPU surface without a webview.

Electrobun ships with Hutch, a native build and workspace CLI that manages SDKs and toolchains. Projects can be started from templates with `hutch electrobun init`, `bunx electrobun init`, or `npx electrobun init`. Platform support covers macOS 14+, Windows 11 x64, and Ubuntu 24.04+ as official targets.

Key features

  • 01Write main-process and webview code in TypeScript with typed RPC between them
  • 02Self-extracting bundles compressed with Zstandard
  • 03Binary patch updates (BSDIFF) with full-download fallback
  • 04Optional bundled Chromium (CEF) or WebGPU surface
  • 05Main process can also use Zig, Rust, Go, or Odin

Use cases

  • Shipping a small TypeScript desktop tool that needs frequent, low-bandwidth updates
  • Building a desktop front end for an existing Bun or web app
  • Embedding native GPU rendering alongside a web-based UI

Quick start

  1. 1

    Install the Hutch CLI with the official script (macOS or Linux)

  2. 2

    Start from npm, skipping the Hutch install

    npx electrobun init
  3. 3

    Choose a template, then follow the Quick Start guide to run the app

Things to know

  • Linux end-user systems need GTK 3, WebKitGTK 4.1, Ayatana AppIndicator, and librsvg runtime packages installed.
  • Cottontail, the JSC-based alternative runtime, is experimental.

Topics

FAQ

What is electrobun?
Cross-platform desktop app framework for building small, fast apps with TypeScript in the main process and webviews, with Zig, Rust, Go, or Odin also supported. Electrobun is a framework for building, updating, and shipping cross-platform desktop applications. Application logic runs in a Bun-based main process written in TypeScript, while the UI is rendered in isolated webviews. Typed RPC connects the two processes, so developers can keep main and webview code in one codebase with type safety.
Is electrobun free to use? What license does it have?
electrobun is open source under the MIT license. Check the license terms before using it in commercial products.
Is electrobun still maintained?
Actively maintained. The last commit to electrobun was on Oct 18, 2026.
What can I use electrobun for?
Shipping a small TypeScript desktop tool that needs frequent, low-bandwidth updates Building a desktop front end for an existing Bun or web app Embedding native GPU rendering alongside a web-based UI
How do I install electrobun?
Install the Hutch CLI with the official script (macOS or Linux) Start from npm, skipping the Hutch install: npx electrobun init Choose a template, then follow the Quick Start guide to run the app
Where can I get electrobun?
The source code and installation instructions are on GitHub: https://github.com/blackboardsh/electrobun

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects