formal-web is a Rust web-engine prototype in alpha status, with an embedding API and an optional TLA+ verification layer.
- Rust toolchain:
rustup toolchain install 1.94.0 - GStreamer (for media): see gstreamer docs for platform-specific installation
# Check all (type-check every package without producing binaries)
rustup run 1.94.0 cargo check
# Build all (root + embedder + content + net + media)
rustup run 1.94.0 cargo build --release
# Run all (launches the embedder, which spawns content/net/media)
rustup run 1.94.0 cargo run --releaseWithout media:
rustup run 1.94.0 cargo build --release --no-default-features
rustup run 1.94.0 cargo run --release -- --no-default-featuresA multiprocess approach is chosen by default, because the goal is to match Apple's guidelines for an independent browser engine.
The following procesess are used:
- Main: running the
embedder,webview, anduser_agentcrates. The process is started insrc/main.rs. - Content: running the
contentcrate, and started inuser_agent/src/event_loop.rs, because each process is running what is essentially a window event loop. In the future it will also run dedicated worker event loops. Service workers will likely run in their own process, and for shared worker the issue hasn't been decided yet (it seems there is a move towards isolating them per top-level sites). There is one process per similar origin window agent; this is the only type of process of which there can be more than one. - Net: running the
netcrate. That process is owned by the fetch worker inuser_agent/src/fetch.rs, and the code in the process will essentially be the part of the fetch standard that starts at https://fetch.spec.whatwg.org/#http-network-or-cache-fetch. - Media: running the
mediacrate, which runs gstreamer, which is started and owned by the media worker inuser_agent/src/media.rs. This is an optional feature as expalined above under Quick Start.
| Directory | Description |
|---|---|
embedder/ |
Application lifecycle, window management, browser chrome, redraw loop |
user_agent/ |
Navigables, session history, event loops, timers, fetch workers |
content/ |
DOM, HTML algorithms, Boa JS integration, Web IDL bridges |
media/ |
GStreamer video decoding pipeline |
net/ |
HTTP and file fetch |
webview/ |
Embedder-facing compositor and redraw API |
automation/ |
WebDriver and CDP wire-protocol servers |
verification/ |
Trace recording, TLA+ validation |
ipc_messages/ |
Shared IPC message types |
tests/ |
Formal tests and WPT runner |
artifacts/ |
Default startup pages for testing |
pi-share-hf— Archives pi coding sessions to.pi/collected-sessions/browser— Wraps CDP server into agent-callable dev toolsweb_standards— Lazily loaded web spec content for interactive reading
Sessions are archived to .pi/collected-sessions/ on shutdown. Upload with:
./sync-hf-sessions.sh