electrobun README

README проекта с github.com/blackboardsh/electrobun. Одним файлом markdown: README.md.

Logo

Electrobun

Build fast, compact, cross-platform desktop apps with TypeScript, Zig, Rust, Go, or Odin.

Host your app's releases on any static HTTPS host, or use Electrobun's managed hosting and analytics platform. See the hosting, Insights, and migration guides.

Get started

Install Hutch on macOS or Linux:

curl -fsSL https://artifacts.electrobun.dev/hutch/install.sh | sh

Or on Windows PowerShell:

& ([scriptblock]::Create((irm https://artifacts.electrobun.dev/hutch/install.ps1)))

Then open the template picker. Restart your terminal first if hutch isn't found.

hutch electrobun init

Already use Bun or npm? You can start with either command instead:

bunx electrobun init
# or
npx electrobun init

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

What is Electrobun?

Electrobun aims to be a complete solution-in-a-box for building, updating, and shipping fast, compact, cross-platform desktop applications written in TypeScript. Hutch is the native build and workspace CLI. Bun is Electrobun's default JavaScript runtime. Cottontail is an experimental JSC-based alternative. Electrobun's platform layer combines Zig, Objective-C, and C++.

Explore Electrobun and read the documentation for API references, guides, and examples.

Published templates include the Electrobun version they were tested with. Hutch manages the SDKs and toolchains needed to build them. See the Hutch guide for project configuration and version management.

Hutch's built-in npm-compatible resolver installs JavaScript dependencies by default and writes hutch.lock; hutch pm exec runs project-local package binaries. A project's hutch.config.ts may instead select npm, Bun, pnpm, Yarn, or a custom executable, and Hutch delegates package operations to that explicit choice. Package management is independent of whether the app's main process runs on Cottontail or Bun.

Don't miss our:

Project Goals

Develop with Dash

Dash is our general-purpose IDE for building any kind of software, with a workflow designed for Electrobun apps. Keep code, terminals, Git, scripts, and coding agents together, and build and test on your connected Mac, Windows, and Linux machines. Dash itself is built with Electrobun.

Apps Built with Electrobun

Video Demos

Audio TTS Demo

Co(lab) Demo

DOOM Demo

Star History

Electrobun star history four weeks after the v1 launch
star history 4 weeks after v1 launch

Contributing

Electrobun is one piece of a vision I'm building. I'm optimizing for focus and execution. Issues and PRs can be used to share ideas, but there should be no expectation that I will review, respond to, or merge them.

Ways to get involved:

Development Setup

Building apps with Electrobun is as easy as installing Hutch and running hutch electrobun init.

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

Prerequisites

Install Hutch globally before building Electrobun:

curl -fsSL https://artifacts.electrobun.dev/hutch/install.sh | sh

On Windows PowerShell:

& ([scriptblock]::Create((irm https://artifacts.electrobun.dev/hutch/install.ps1)))

macOS:

Windows:

Linux:

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

Linux applications also require the corresponding GTK 3, WebKitGTK 4.1, Ayatana AppIndicator, and librsvg runtime packages on end-user systems. See the cross-platform development guide for distro-specific install commands. The launcher reports the exact missing shared library when these dependencies are unavailable. Wayland screen-region capture additionally requires a working desktop portal, PipeWire, and the libpipewire-0.3.so.0 runtime library (provided by libpipewire-0.3-0, or libpipewire-0.3-0t64 on newer Ubuntu/Debian releases).

First-time Setup

git clone --recurse-submodules https://github.com/blackboardsh/electrobun.git
cd electrobun/package
npm ci
hutch dev:clean

Development Workflow

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

# After making changes to source code
hutch dev

# Exercise one repository template against the same local package/dist
hutch dev:template hello-world

# If you need a completely fresh start
hutch dev:clean

hutch dev builds package/dist and runs Kitchen against that local Electrobun devkit. Running hutch dev directly from kitchen/ continues to use the Electrobun version pinned in kitchen/hutch.config.ts.

hutch dev:template <template-name> builds the same local devkit, runs the template's configured dependency installation, and starts its dev task against those local bytes. Repository templates stay unpinned for this workflow; the release publisher injects the shipped Electrobun version into each staged template archive.

The native build generates package/src/native/compile_flags.txt from the compiler flags resolved for the current machine. clangd-compatible editors discover it automatically; rerun the build after changing native dependencies or system toolchains.

With sibling jsc, cottontail, dash-cloud, and electrobun checkouts, use --local to additionally build and select the local JSC, Cottontail, and Hutch layers:

hutch dev --local

The first Hutch is globally installed. Stack preparation explicitly selects the completed local Hutch engine and Cottontail build for the remainder of the command.

Additional Commands

All commands are run from the /package directory:

Debugging

macOS: Use lldb <path-to-bundle>/Contents/MacOS/launcher and then run to debug release builds

Platform Support

OS Status
macOS 14+ (Apple Silicon and Intel x64) Official
Windows 11+ x64 Official
Windows 11+ ARM64 Beta
Ubuntu 24.04+ Official
Other Linux distros (gtk3, webkit2gtk-4.1) Community
Raspberry Pi Unofficial fork: kortexa-ai/electrobun (linux-wpe) — follow the author @francip

Windows ARM64 supports JavaScript, Zig, Rust, and Go main processes with the system webview or CEF. Odin is currently unavailable on this target.

electrobun (blackboardsh/electrobun)

Ищем в базе…

Что это такое?Electrobun — это фреймворк для создания быстрых, компактных кроссплатформенных десктопных приложений, написанных полностью на TypeScript, со своими встроенными инструментами сборки, рантаймом и слоем для работы с нативными платформами.
Это по сути Electron или что-то написанное с нуля?Это собственный фреймворк, а не обёртка над Electron: вместо того чтобы упаковывать Node и Chromium, он использует Cottontail, собственный JavaScript-рантайм на основе JSC, а также нативный слой платформы, написанный на Zig, Objective-C и C++.
Как начать новый проект?Установите Hutch, нативный CLI-инструмент Electrobun для сборки и управления рабочей областью, а затем создайте шаблон командой 'electrobun init'.
Какой рантайм используется вместо Node и Chromium?Используется Cottontail, собственный рантайм Electrobun на основе JSC (JavaScriptCore), который запускается через CLI Hutch для сборки и управления рабочей областью.
Одинаково ли надёжна поддержка на всех ОС?Официально поддерживаются только macOS 14+, Windows 11+ и Ubuntu 24.04+. Остальные дистрибутивы Linux (gtk3, webkit2gtk-4.1) поддерживаются сообществом, а Raspberry Pi работает только через неофициальный форк.
Что такое Hutch?Hutch — это нативный CLI-инструмент Electrobun для сборки и управления рабочей областью. С его помощью создаются проекты, запускаются сборки для разработки и компилируются релизные пакеты.
Что он делает иначе, чтобы приложения оставались компактными, а обновления — быстрыми?Он стремится к небольшим самораспаковывающимся пакетам приложений при использовании системного webview и к небольшим обновлениям, которые применяют бинарные патчи, а при необходимости переходят к полной сжатой загрузке.
Можно ли использовать WebGPU или 3D-библиотеки напрямую?Да. Electrobun открывает доступ к WGPU для управления нативной GPU-поверхностью без webview и поставляет адаптеры для Three.js и Babylon.js, которые работают напрямую в главном процессе Cottontail.
Какие приложения реально создали люди с его помощью?Среди проектов сообщества есть редактор PDF/DOCX, Git-клиент, менеджер паролей для ИИ, редактор Markdown, читалка комиксов и даже порт DOOM, а также десятки других десктопных инструментов.
Какие есть похожие проекты?nanoui, gpuix-svelte, mutracer, native, BUI, renderdoc, renderdocBread, tinyjsapp
В каких он темах?zig, rpc, webgpu, threejs, rendering, electron, c++, desktop, performance, framework, gui, gpu
Автор
blackboardsh
Размер
151.6 MB
Звёзды
13.1K
Возраст
2 г
Коммиты · 90 дней