Rustwright: Playwright-Compatible Browser Automation with a Rust CDP Engine
Playwright's API on a Rust CDP engine, Chromium browser automation for Python & Node, no driver subprocess. (Alpha).
At a glance
- What is it?
- Rustwright is an alpha browser automation library for Python and Node.js that keeps the Playwright API surface but replaces the Node driver subprocess with an in-process Rust engine speaking raw Chrome DevTools Protocol, removing the driver hop and its associated memory and latency overhead.
- Who is it for?
- Rustwright is a practical choice for teams that run Python-based browser automation at scale on Chromium, want to reduce memory pressure from the Node driver, or need to serve automation tasks through an MCP interface to an AI agent. The alpha status and Chromium-only constraint are real limits: any project that currently depends on Firefox, WebKit, or features not yet bridged in Rustwright's partial API surface needs to stay on Playwright.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What Rustwright Is and the Problem It Addresses
Playwright for Python (playwright-python) works by launching a bundled Node.js binary on the host, then piping CDP commands through that Node process to the browser. The README illustrates the difference in a short architecture diagram:
playwright-python: your code ──pipe──► Node driver ──CDP──► Chromium
rustwright: your code ────────── raw CDP ──────────► ChromiumRustwright removes that middle hop. A Rust core, built on Tokio with a WebSocket CDP client, drives Chromium directly. PyO3 bindings expose the Rust core to Python, and napi-rs bindings expose it to Node.js. The same compiled Rust library backs both language bindings.
The practical consequences of this architecture, according to the README: the Node driver binary never loads, so its automation fingerprint never appears in the browser session; all input events use real CDP input events (Input.dispatchMouseEvent) rather than synthetic DOM element.click() calls; and cross-origin iframes are handled natively through flattened CDP sessions.
The benchmarks in BENCHMARK.md claim 2.55 times faster operation and 70 percent less memory than playwright-python. The README notes that these are from BENCHMARK.md and that Rustwright is interoperable with Playwright, meaning existing Playwright code runs on the Rust engine with one changed import.
Installing Rustwright for Python and Node.js
The Python package is on PyPI. Install it and download a Chromium binary with two commands:
pip install rustwright
python -m rustwright install chromiumThe import change from Playwright is a single line. The sync API variant:
- from playwright.sync_api import sync_playwright
+ from rustwright.sync_api import sync_playwrightAfter that change, existing Playwright Python code runs on the Rust engine without further modification, subject to the partial API surface. The pyproject.toml lists supported Python versions as 3.9 through 3.15, with a note that 3.15 support was verified on 3.15.0rc1 and tracks 3.15-dev until the GA release.
For Node.js, install from npm:
npm install rustwrightThe Node binding requires an existing Chromium or Chrome binary. Point Rustwright at it with the RUSTWRIGHT_CHROMIUM, CHROME, or CHROMIUM environment variable. To build the Node binding from source, clone the repository and run npm install and npm run build inside the node/ directory. The README marks the Node binding as experimental.
If you already have a Chrome or Chromium binary installed on the system, set RUSTWRIGHT_CHROMIUM to its path and skip the rustwright install chromium step.
CLI and MCP Server
Rustwright ships a native CLI tool called rustwright-cli, installed via a shell script:
curl -fsSL https://raw.githubusercontent.com/Skyvern-AI/rustwright/main/install.sh | shThe CLI drives a persistent Chromium session from a shell or agent loop. Accessibility snapshots give compact page representations using element references (e1, e2, and so on) rather than raw HTML:
rustwright-cli open https://example.com
rustwright-cli snapshot
rustwright-cli click @e1
rustwright-cli closeThe MCP server, rustwright-mcp, is a native Rust binary with no Python or Node runtime in the serving path. It exposes browser_* tools over stdio, with accessibility snapshots and inline PNG screenshots, to any MCP client. Adding it to Claude Code:
claude mcp add rustwright -- rustwright-mcpFor Claude Desktop on macOS, the configuration file is at ~/Library/Application Support/Claude/claude_desktop_config.json. The rustwright-mcp binary is installed from source using cargo install with the repository URL. An npm package with prebuilt binaries is described as forthcoming in the README.
Automation Detection and Cross-Origin Iframes
Playwright for Python loads a Node driver binary that introduces specific patterns detectable by anti-automation systems. Because Rustwright does not load that driver, the driver's fingerprint is absent from the session. The README states this directly as a design property and links to an automation detection section for more detail.
All input events in Rustwright use CDP's Input.dispatchMouseEvent and equivalent typed input events, rather than calling element.click() or dispatchEvent() on DOM nodes from JavaScript. This distinction matters for sites that detect synthetic DOM manipulation versus native input events.
Cross-origin iframes (out-of-process iframes, called OOPIF in the CDP specification) are automatically handled. Rustwright auto-attaches to child frame targets and flattens the CDP sessions so that frame_locator() works across origins without requiring the caller to manage separate browser contexts for each iframe target. This is a known limitation in some CDP clients that do not handle OOPIF auto-attachment.
Current Limitations and Alpha Status
Rustwright is Chromium-only. Firefox and WebKit are not supported. The README labels the project as alpha, and the pyproject.toml Development Status classifier is '3 - Alpha'. Breaking changes are expected as the project matures.
Only a subset of the Playwright API surface is bridged. The README says explicitly that not all methods are available, and links to LIMITATIONS.md for the current status. Teams that depend on specific Playwright methods should check LIMITATIONS.md before starting a migration.
The Node binding is marked experimental in the README. It requires a pre-existing browser binary rather than the automatic Chromium download that the Python path supports. Building the Node binding from source requires a Rust toolchain.
The project version in pyproject.toml and Cargo.toml is 0.3.0. There are no GitHub releases in the repository. The last push was on 2026-09-24, and the CHANGELOG.md file is present, suggesting the project tracks changes between commits.
Comparing Rustwright to Playwright and Similar Tools
Playwright is the reference implementation that Rustwright is designed to be compatible with. Playwright supports Python, Node.js, Java, and .NET with full browser coverage (Chromium, Firefox, WebKit). Rustwright supports Python and Node.js with Chromium only, and implements a subset of the API. The trade-off, according to the README, is performance and memory at the cost of browser coverage and API completeness.
Cdp4j, an earlier Java-based CDP client, takes a similar approach of removing the driver layer, but targets Java rather than Python or Rust. Pyppeteer was a Python CDP client for Chromium that is no longer actively maintained. Rustwright occupies a similar design space as pyppeteer but with a Rust core, current Python support, and the explicit goal of Playwright API compatibility.
For teams that need multi-browser support, full Playwright API coverage, or production stability, Playwright is the appropriate choice. Rustwright is the right direction for teams specifically optimizing for Chromium-only automation speed, memory per browser instance, or the absence of the Node driver fingerprint.
Repository Structure and License
The repository uses a Cargo workspace with multiple crates. The workspace Cargo.toml shows the primary crates: rustwright-core (the Rust CDP client), rustwright (the Python extension module via PyO3), and capi, rust-native, and agent as workspace members. The node/ directory contains the Node.js binding built with napi-rs.
Language binding directories beyond Python and Node include go/, java/, csharp/, ruby/, and php/, suggesting work is underway on additional language targets, though the README focuses on Python and Node.js as the current primary surfaces.
The repository includes a Dockerfile for containerized builds, a BENCHMARK.md with benchmark methodology documentation, LIMITATIONS.md with API coverage status, and QUICKSTART.md as a condensed getting-started guide. The CHANGELOG.md, CODE_ARCHITECTURE.md, and SECURITY.md round out the documentation.
The project is MIT-licensed. Copyright is held by Rustwright Contributors, and the package is published by Skyvern-AI.
Editorial conclusion
Rustwright is a practical choice for teams that run Python-based browser automation at scale on Chromium, want to reduce memory pressure from the Node driver, or need to serve automation tasks through an MCP interface to an AI agent. The alpha status and Chromium-only constraint are real limits: any project that currently depends on Firefox, WebKit, or features not yet bridged in Rustwright's partial API surface needs to stay on Playwright. Before adopting, check LIMITATIONS.md for the specific Playwright API methods not yet implemented, and verify that the version of Python you use is in the supported range (3.9 to 3.15).
Frequently asked questions
Does Rustwright support Firefox or Safari in addition to Chromium?
No. Rustwright is Chromium-only in its current alpha state. The README does not document any plans for Firefox or WebKit support. Teams that need cross-browser coverage should continue using Playwright.
Is Rustwright compatible with existing Playwright Python tests?
Rustwright is designed for compatibility: changing one import line from playwright.sync_api to rustwright.sync_api is the only required change for code that uses the bridged API surface. However, only a subset of the Playwright API is implemented, so tests that use methods not yet bridged will fail. The current coverage status is in LIMITATIONS.md.
How does the rustwright-mcp server work for AI agents?
rustwright-mcp is a native Rust binary that exposes browser_* tools over stdio using the Model Context Protocol. It provides compact accessibility snapshots with element references (e1, e2, and so on) and inline PNG screenshots. It can be added to Claude Code with claude mcp add rustwright -- rustwright-mcp, and requires the rustwright-mcp binary to be installed first from source.
Community notes