rustwright  by Skyvern-AI

Playwright API with a native Rust engine for faster browser automation

Created 2 weeks ago

New!

768 stars

Top 44.7% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> Rustwright offers a Rust-based Chrome DevTools Protocol (CDP) engine for Playwright's API, targeting Python and Node.js developers. It aims to replace Playwright's Node.js driver with a faster, more memory-efficient native engine, claiming 2.55x speedup and 70% less client memory. Key benefits include reduced automation fingerprinting and direct CDP interaction for enhanced performance and stealth.

How It Works

A core Rust engine built on Tokio handles raw CDP communication directly with Chromium. Thin PyO3 (Python) and napi-rs (Node.js) bindings expose this engine in-process, eliminating the Node.js driver subprocess. This architecture enables direct CDP interaction, boosting performance, reducing memory overhead, and avoiding Playwright's specific automation signatures. It also supports cross-origin iframes (OOPIF) and trusted input events by default.

Quick Start & Requirements

  • Installation:
    • Python: pip install rustwright
    • Node.js: npm install rustwright
  • Browser Setup:
    • Python requires python -m rustwright install chromium for a one-time Chromium download.
    • Node.js can use existing binaries via environment variables like RUSTWRIGHT_CHROMIUM.
  • Prerequisites: Python 3.8+, Node.js.
  • Docs: API parity details are available at docs/PARITY.md.

Highlighted Details

  • Performance: Benchmarks indicate up to 2.55x speedup and ~70% reduction in client memory footprint compared to playwright-python.
  • Stealth: Avoids Playwright's specific automation fingerprint and common detection vectors.
  • AI Integration: Features rustwright-agent CLI and an MCP server for AI agents, enabling interaction via stable element references and accessibility snapshots.
  • OOPIF: Alpha support for auto-attaching out-of-process iframes with flattened CDP sessions.
  • Remote Sessions: Integrates with Skyvern's paid hosted browser sessions for persistent, cloud-based automation.

Maintenance & Community

Rustwright is currently in an alpha state, developed by Skyvern. Community support and discussion are available via their Discord server.

Licensing & Compatibility

The project is released under the permissive MIT License, suitable for commercial use and integration into closed-source projects.

Limitations & Caveats

As an alpha project, Rustwright has limitations:

  • Browser Support: Strictly limited to Chromium; Firefox and WebKit are not supported.
  • API Coverage: While Python sync API coverage is high (~96%), Node.js bindings are experimental and cover only a subset of features. Python async API uses threads, limiting high fan-out concurrency.
  • OOPIF: Support is in alpha with known gaps.
  • Automation Detection: While it removes Playwright's fingerprint, it is not fully undetectable and may still be flagged by certain advanced detection methods. It does not offer CAPTCHA or Cloudflare bypass capabilities.
Health Check
Last Commit

20 hours ago

Responsiveness

Inactive

Pull Requests (30d)
132
Issues (30d)
8
Star History
769 stars in the last 20 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

obscura by h4ckf0r0day

0.3%
20k
Lightweight headless browser for AI agents and web scraping
Created 3 months ago
Updated 3 days ago
Feedback? Help us improve.