Moli Builds a Rust Browser That Uses 10x Less Memory Than Chrome

Moli is a headless browser built in Rust from scratch that skips rendering by default, cutting memory use to roughly one-tenth of Chrome for agent workloads.

·
·
Moli Builds a Rust Browser That Uses 10x Less Memory Than ChromePRO
Read2 min
TypeRepo
  • Moli is a Rust headless browser built for AI agents, DOM-first with pixels on demand.
  • Uses real V8, Servo/Stylo, Taffy, and Parley, but skips retained layout, paint, and GPU compositor.
  • Single binary exposes CDP, WebDriver Classic, and WebDriver BiDi from one scheduler.
  • Matches Chrome Headless crawl success at 73 MiB RSS versus 773 MiB on a 192-URL public-web test.
  • CDP-ready in 34.85 ms versus 169.37 ms for Chromium, one process instead of eleven.
  • Ships MCP server, Markdown/semantic tree extraction, and Playwright-over-CDP compatibility under Apache/MIT license.

Moli builds a browser kernel for AI agents

Moli, a new Rust project, implements a headless browser for AI agents without wrapping Chromium or Firefox. It returns structured DOM state by default and generates pixels only when requested.

Most browser agents consume text, links, DOM nodes, form controls, and JavaScript results. Conventional browsers also maintain layout, painting, and compositing systems designed for an interactive visual window. Moli removes that continuous rendering overhead while retaining networking, storage, JavaScript execution through V8, and native DOM and CSS state.

Pixels become a query

Moli’s default mock-layout policy avoids the full layout and paint pipeline. Starting it with --layout enables real geometry, hit testing, coordinate-based input, screenshots, and screencasts. Rendering still runs only in response to a request.

A cold geometry query rebuilds layout once and retains the latest snapshot. Screenshot and screencast requests rebuild from the current DOM and styles, producing fresh frames through a one-shot software-rendering pipeline instead of a retained 60 FPS compositor.

The kernel combines established web components around its own scheduler and browser APIs:

Layer Components
Network transport libcurl
HTML parsing html5ever
JavaScript rusty_v8 and V8
CSS selectors and cascade Servo and Stylo
Box and text layout Taffy and Parley
Software rendering

Pro article

This story is for Pro members

You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.

Comments

avatar