Introducing Lightpanda: An Open-Source Headless Browser

Lightpanda is a new open-source browser designed for headless usage, offering features such as JavaScript execution and partial support for Web APIs. It is compatible with Playwright and Puppeteer through a work-in-progress (WIP) Chrome DevTools Protocol (CDP).

Efficiency and Speed

Lightpanda provides fast web automation ideal for applications like AI agents, large language model training, web scraping, and testing. It boasts an ultra-low memory footprint, using nine times less memory than Chrome, and executes tasks 11 times faster with instant startup capabilities.

Getting Started

For quick installation, users can download the latest binaries from nightly builds for Linux x86_64 and MacOS aarch64. The browser can be started by fetching a page or initiating a CDP server, allowing further automation with tools like Puppeteer.

Building from Source

Lightpanda is developed using Zig version 0.13.0 and relies on several dependencies, including zig-js-runtime with V8, Netsurf libraries, and Mimalloc. Step-by-step build instructions are provided for both Debian/Ubuntu and MacOS environments.

Testing and Contribution

Users can run unit tests and Web Platform Tests to ensure Lightpanda’s performance and compatibility. The project is open to contributions through GitHub, with guidelines for submitting pull requests.

Why Lightpanda?

While modern web environments require JavaScript execution, traditional browsers like Chrome pose challenges for headless operation due to high resource consumption and maintenance complexity. Lightpanda addresses these issues by being purpose-built for headless performance from the ground up, using the Zig programming language for optimized execution.

Current Status and Features

Lightpanda is in its Beta stage with ongoing development. Key implemented features include an HTTP loader, HTML parser, JavaScript support using the V8 engine, AJAX capabilities, and a basic CDP/websockets server. Although coverage of Web APIs is expanding, users should anticipate that some websites may not function correctly at this stage.