- JavaScript 58.8%
- Zig 26.8%
- Go 9.3%
- CSS 2.8%
- HTML 1.1%
- Other 1.2%
Add the Go HTTPS/HTTP3 frontend backed by the Zig session engine and PTY worker. Harden connection ownership, bounded transport queues, hedged WSS roaming, and terminal rendering. |
||
|---|---|---|
| bcwebmux | ||
| common/terminal | ||
| docs | ||
| wgpuTerminal | ||
| .gitignore | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
bcwebmux
A fast browser terminal built with Ghostty's terminal engine, WebAssembly with WebGPU and an automatic WebGL2 fallback, and a Go HTTPS server with a Zig session core.
Get started
bcwebmux/README.mdcovers running, configuring, and developing the complete application.wgpuTerminal/README.mdcovers building and embedding the standalone terminal.
What lives where?
This repository contains both a complete remote-terminal application and the reusable browser terminal it is built on. They are not the same component:
bcwebmux/is the complete application, including the browser UI, session management, transport, and Go/native server that runs shells in PTYs.wgpuTerminal/is the reusable JavaScript terminal frontend with its public API, browser input, selection, scrolling, and rendering. It provides no PTY, server, or transport.common/terminal/is the low-level WASM engine integrating Ghostty with terminal emulation, font shaping/rasterization, render batches, and shaders.
The browser stack is bcwebmux/web → wgpuTerminal → terminal.wasm built
from common/terminal. Separately, the application connects to the Go server →
native Zig session core/PTY worker → shell. The native server also uses Ghostty,
but does not run the browser WASM wrapper.
Just want something like xterm.js?
Use wgpuTerminal/, not the complete bcwebmux application.
It fills the embeddable-terminal role; it is not an xterm.js-compatible drop-in
API. See the package README for an integration example
and index.d.ts for the public API.
Where do I make a change?
- Application UI and session/reconnect behavior:
bcwebmux/web/; see the connection lifecycle documentation. - HTTP/TLS, WebSockets, and server configuration:
bcwebmux/go/. - Native sessions, persistence, and PTYs:
bcwebmux/src/. - Embeddable API, browser input, selection, scrolling, and GPU rendering:
wgpuTerminal/src/; API types are inindex.d.ts. - WASM terminal emulation, fonts, and render data:
common/terminal/; see the glyph-cache design. - Builds and tests:
bcwebmux/build.zigandbcwebmux/test/. Tests cover the application and reusable terminal; Go and Zig tests also live alongside their sources.
Edit source directories, not generated zig-out/, wgpuTerminal/dist/,
dependency caches (zig-pkg/, node_modules/), or vendored Go dependencies.
License
This project is licensed under the MIT License.