← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

OpenCode's browser automation tool rebuilt in Rust, reducing memory use by 97%

🔄 Updated 5d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • OpenCode's browser tool rewritten in Rust.
  • Memory use fell from 190 MB to 5.6 MB per connector.
  • Rust binary size is 4.3 MB, down from 53-64 MB.
  • Replaced Playwright/Patchright with custom Rust implementation.

Rust Rewrite for Browser Automation

Dax Raad, a developer at OpenCode, rebuilt the project's browser automation tool using Rust. This initiative involved replacing functionalities previously handled by Playwright and Patchright, which were part of the Node.js implementation.

Significant Memory and Binary Size Reductions

The transition to Rust resulted in a 97% reduction in memory usage for each OpenCode Browse connector, dropping from approximately 190 MB to 5.6 MB after several calls. The new Rust binary is 4.3 MB, a decrease from the previous Node version's 53 to 64 MB. The relay component also saw a reduction in idle memory from 353 MB (Node) to 6 MB (Rust).

This reduction in resource consumption is attributed to the custom Rust implementation replacing the previous Node.js dependencies.

Technical Implementation Details

The new Rust relay communicates with the Chromium extension via WebSockets and utilizes the Chrome DevTools Protocol for browser operations, agent sessions, recordings, and network captures. It also embeds QuickJS to execute agent-supplied JavaScript, removing the need for a Node.js runtime.

The rewrite focused on the core functionality needed by OpenCode Browse, which connects AI coding agents to a developer's browser through a Chromium extension and an MCP server.

Testing and Remaining Features

Two rounds of testing with about 10 regression agents against a real Chrome browser were conducted. Browse achieved an 85% score on Stealth Bench v2. Some features, such as time zone and locale emulation, and the download tool, were not included in the rewrite. The Rust version retains existing issues like a busy-looping eval that cannot be stopped via the extension. Relay authentication, extension pairing, origin restrictions, and agents remain part of the tool.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 21

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Primary sources

GitHub anomalyco/browse

Reporting from

Dax Raad rebuilt OpenCode's browser automation tool in Rust, replacing parts of Playwright and Patchright. This rewrite reduced the tool's memory footprint by approximately 97% and resulted in a smaller binary size.