An open API service indexing awesome lists of open source software.

https://github.com/blackboardsh/electrobun

Build ultra fast, tiny, and cross-platform desktop apps with Typescript.
https://github.com/blackboardsh/electrobun

Last synced: about 15 hours ago
JSON representation

Build ultra fast, tiny, and cross-platform desktop apps with Typescript.

Awesome Lists containing this project

README

          


Logo

Electrobun


Get started with a template

npx electrobun init

## What is Electrobun?

Electrobun aims to be a complete **solution-in-a-box** for building, updating, and shipping ultra fast, tiny, and cross-platform desktop applications written in Typescript.
Under the hood it uses bun to execute the main process and to bundle webview typescript, and has native bindings written in zig.

Visit https://blackboard.sh/electrobun/ to see api documentation, guides, and more.

**Project Goals**

- Write typescript for the main process and webviews without having to think about it.
- Isolation between main and webview processes with fast, typed, easy to implement RPC between them.
- Small self-extracting app bundles ~12MB (when using system webview, most of this is the bun runtime)
- Even smaller app updates as small as 14KB (using bsdiff it only downloads tiny patches between versions)
- Provide everything you need in one tightly integrated workflow to start writing code in 5 minutes and distribute in 10.

## Apps Built with Electrobun
- [Audio TTS](https://github.com/blackboardsh/audio-tts) - desktop text-to-speech app using Qwen3-TTS for voice design, cloning, and generation
- [Co(lab)](https://blackboard.sh/colab/) - a hybrid web browser + code editor for deep work
- [DOOM](https://github.com/blackboardsh/electrobun-doom) - DOOM implemented in 2 ways: bun -> (c doom -> bundled wgpu) and (full ts port bun -> bundled wgpu)

### Video Demos

[![Audio TTS Demo](https://img.youtube.com/vi/Z4dNK1d6l6E/maxresdefault.jpg)](https://www.youtube.com/watch?v=Z4dNK1d6l6E)

[![Co(lab) Demo](https://img.youtube.com/vi/WWTCqGmE86w/maxresdefault.jpg)](https://www.youtube.com/watch?v=WWTCqGmE86w)

[![DOOM Demo](https://github.com/user-attachments/assets/6cc5f04a-6d97-4010-b65f-3f282d32590c)](https://x.com/YoavCodes/status/2028499038148903239?s=20)

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=blackboardsh/electrobun&type=date&legend=top-left&cache=2)](https://www.star-history.com/#blackboardsh/electrobun&type=date&legend=top-left)

## Contributing
Ways to get involved:

- Follow us on X for updates @BlackboardTech or @yoav.codes
- Join the conversation on Discord
- Create and participate in Github issues and discussions
- Let me know what you're building with Electrobun

## Development Setup
Building apps with Electrobun is as easy as updating your package.json dependencies with `npm add electrobun` or try one of our templates via `npx electrobun init`.

**This section is for building Electrobun from source locally in order to contribute fixes to it.**

### Prerequisites

**macOS:**
- Xcode command line tools
- cmake (install via homebrew: `brew install cmake`)

**Windows:**
- Visual Studio Build Tools or Visual Studio with C++ development tools
- cmake

**Linux:**
- build-essential package
- cmake
- webkit2gtk and GTK development packages

On Ubuntu/Debian based distros: `sudo apt install build-essential cmake pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev`

### First-time Setup

```bash
git clone --recurse-submodules https://github.com/blackboardsh/electrobun.git
cd electrobun/package
bun install
bun dev:clean
```

### Development Workflow

```bash
# All commands are run from the /package directory
cd electrobun/package

# After making changes to source code
bun dev

# If you only changed kitchen sink code (not electrobun source)
bun dev:rerun

# If you need a completely fresh start
bun dev:clean
```

### Additional Commands

All commands are run from the `/package` directory:

- `bun dev:canary` - Build and run kitchen sink in canary mode
- `bun build:dev` - Build electrobun in development mode
- `bun build:release` - Build electrobun in release mode

### Debugging

**macOS:** Use `lldb /Contents/MacOS/launcher` and then `run` to debug release builds

## Platform Support

| OS | Status |
|---|---|
| macOS 14+ | Official |
| Windows 11+ | Official |
| Ubuntu 22.04+ | Official |
| Other Linux distros (gtk3, webkit2gtk-4.1) | Community |