# \[Project\] sol: A self-contained browser kernel written in Rust

**URL:** <https://users.rust-lang.org/t/project-sol-a-self-contained-browser-kernel-written-in-rust/143110>\
**Category:** announcements\
**Created:** [October 18, 2026, 1:58am UTC](https://users.rust-lang.org/t/project-sol-a-self-contained-browser-kernel-written-in-rust/143110 "2026-10-18T01:58:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lemonhub-io](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/lemonhub-io/32/54397_2.png) [@lemonhub-io](https://users.rust-lang.org/u/lemonhub-io)\
**Post date:** [October 18, 2026, 1:58am UTC](https://users.rust-lang.org/t/project-sol-a-self-contained-browser-kernel-written-in-rust/143110/1 "2026-10-18T01:58:37Z")

</div>

Body:

Hi everyone,

I'm excited to share a project I've been working on: **sol, a self-contained browser kernel written in Rust.**

Unlike modern browser wrappers that rely on Chromium or Blink, sol implements the entire core browser pipeline from scratch.

We do use mature Rust libraries for infrastructure (e.g., ureq/rustls for networking, rustybuzz for text shaping, tiny-skia for rasterization), but the heavy lifting of the browser engine is entirely in-tree.

**The pipeline:**

_fetch → HTML parse → CSS cascade → layout → display list → raster → PNG_ (with JS eval and DOM mutation triggering refreshes)

**What is implemented in-tree:**

**·** _sol\_html:_ Full HTML5 tokenizer and tree builder (insertion modes, adoption agency, foster parenting).

**·** _sol\_css:_ General token/component AST, selector engine, cascade/inheritance, custom properties, media/supports conditions, math.

**·** _sol\_layout:_ Box-tree builder; block, inline/IFC, floats, flexbox, table, abs/fixed positioning.

**·** _sol\_js:_ An ES-subset interpreter with a tree-walk evaluator, mark-sweep GC, regex engine, microtasks, and DOM/window bindings.

**·** _sol\_dom:_ Arena-based DOM with generational IDs and dirty-flag subtrees.

**·** _sol\_img:_ Bounded PNG, GIF, and BMP decoders (no external image crates).

It's a massive undertaking (about 31k lines of Rust), and it's built with safety and strict bounds in mind.We have enforced memory limits for decoding, font parsing, and network I/O to prevent OOMs.

**Try it out:**

The CLI allows you to render a viewport to PNG, dump the DOM, or even serve a remote window for headless machines (sol surf):

_cargo build -p sol_

_./target/debug/sol shot demo/page.html /tmp/sol-demo.png 1000x640_

**Known Limits (Being honest):**

**·** No CSS Grid yet (Flex/Table/Block are supported).

**·** JS implements a working ES subset (closures, classes, promises, etc.), not full ES2024.

**·** Images: No JPEG/WebP yet.

**·** Network: HTTP/1.1 only, no HTTP/2/3.

Repo: [GitHub - UnionRepos/sol: A modular, self-contained browser kernel in Rust with HTML, CSS, JavaScript, layout, and software rendering · GitHub](https://github.com/UnionRepos/sol)

I'd love to hear your feedback on the architecture, the module boundaries, or the JS GC implementation.

I'm also happy to answer any questions about writing a layout engine in Rust!

---

<div class="post-metadata">

**Author:** ![lemonhub-io](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/lemonhub-io/32/54397_2.png) [@lemonhub-io](https://users.rust-lang.org/u/lemonhub-io)\
**Post date:** [October 18, 2026, 2:04am UTC](https://users.rust-lang.org/t/project-sol-a-self-contained-browser-kernel-written-in-rust/143110/2 "2026-10-18T02:04:05Z")

</div>

To be honest, I completed this project over the weekend with **AI** assistance. I only wrote half of an HTML parser, and then I got stuck 😅
