-
-
Notifications
You must be signed in to change notification settings - Fork 212
Description
Title
Feature Request: Support Bun runtime as an alternative to Node.js
Description
Add support for using Bun as the JavaScript runtime instead of Node.js for the Playwright driver. Bun offers significant performance improvements that would benefit playwright-go users.
Motivation
Performance Benefits:
Faster startup time: Bun starts ~4x faster than Node.js
Lower memory footprint: Bun uses less memory than Node.js
Better subprocess performance: Relevant for the stdio bridge architecture
Native TypeScript support: No transpilation overhead
Developer Experience:
Bun is increasingly popular in the JavaScript ecosystem
Many developers already have Bun installed
Simpler dependency management with Bun's built-in package manager
Current Architecture
As I understand from the codebase, playwright-go uses a Node.js runtime with Playwright that communicates over stdio. The ~50MB bundle includes Node.js + Playwright driver.
Proposed Changes
Make it configurable:
gopw, err := playwright.Run(&playwright.RunOptions{
Runtime: "bun", // or "node" (default)
})Thank you for maintaining this excellent project! 🎭