The Gosub browser engine
Gosub Browser Engine
An embeddable, async browser engine written in Rust.
Join us on our development Zulip chat, or our Discord server for general chat. If you'd like to contribute, start with the contribution guide.
About
Gosub is a modular, embeddable browser engine. The primary entry point is GosubEngine in the gosub_engine crate. You provide a render backend and a compositor; the engine owns a multi-zone/tab model, an async networking stack, cookie and storage isolation per zone, and an event bus. Your user-agent (UA) drives everything via TabCommand and reacts to EngineEvent.
Core components:
| Crate | Role | |---|---| | gosub_engine | GosubEngine โ the unified entry point | | gosub_interface | Shared traits wiring the components together (the config system) | | gosub_html5 | HTML5 tokenizer / parser | | gosub_css3 | CSS3 tokenizer / parser | | gosub-sonar | Networking stack (async, streaming, priority-scheduled) โ external crate | | gosub_taffy | Flexbox / grid layout (Taffy) | | gosub_lattice | CSS table layout | | gosubrenderpipeline | Render pipeline โ stages, tiling, compositor | | gosubrenderercairo | Cairo render backend (CPU) | | gosubrendererskia | Skia render backend (CPU / GPU) | | gosubrenderervello | Vello / wgpu render backend (GPU) | | gosub_fontmanager | Font system โ text shaping and measurement | | gosub_jsapi | Browser Web API implementations (console, fetch, DOM, โฆ) | | gosub_v8 | V8 JavaScript engine bindings | | gosub_config | Configuration store |
For the full crate listing see docs/crates.md.
Status
The engine is under active development. What works today:
- Multi-zone / multi-tab model โ zones isolate cookies and storage; tabs are controlled via
TabCommand - Async networking โ streaming HTTP fetcher with priority queues, inflight coalescing, redirect handling, and per-zone cookie isolation
- Event-driven UA interface โ
EngineEvent(navigation, resource, redraw) flows out;TabCommand/EngineCommandflow in - HTML5 and CSS3 parsing โ spec-compliant parsers for both
- Pluggable render backends โ Null (headless), Cairo (GTK4), Skia, Vello (wgpu)
Documentation
Start here, then dig into the topic you need.
Getting started
- Tutorial โ start the engine, open a tab, navigate, handle events
- Configuration โ choosing a render backend and font system
- Running the examples โ headless, GUI (winit / GTK4 / egui), and component tools
- WebAssembly โ compile and run the engine in the browser
- Development โ tests and benchmarks
- Crates โ the workspace crate layout
- Component tools โ the standalone
cargo run --bin โฆtools
- Networking โ architecture and design notes
- Cookies
- Storage (local / session)
- Pump โ moving HTTP stream data to targets
- Render pipeline
Contributing
We welcome contributions. Because the engine is still taking shape, a lot of work is exploratory โ building proofs-of-concept, reading specs, and making architectural decisions โ rather than pure coding.
Join us on Zulip or Discord before diving in; it will save you time and help us keep things coordinated. See CONTRIBUTING.md for the details.