Skip to main content
The Ladybird browser project has moved to LadybirdBrowser/ladybird. This version is kept as a developer convenience for testing LibWeb and LibJS libraries included with SerenityOS.

Prerequisites

Ladybird requires:
  • Qt6 development packages
  • C++26 capable compiler (g++-14 or clang-17 minimum)
For Ubuntu 20.04 and above, install Qt6 Wayland:

Building with serenity.sh

The simplest way to build Ladybird:

Browser Chrome

The build uses different browser chromes depending on platform:
AppKit - Native macOS chrome

Enabling Qt Chrome

To build the Qt chrome on platforms where it’s not default:
To disable Qt chrome:

Disabling Ladybird

Running Ladybird from serenity.sh changes the CMake cache to always build LibWeb and Ladybird for Lagom.
To restore the default behavior (only build code generators and tools):

Custom CMake Build

For packaging or standalone builds:
1

Configure build

You may need to specify a suitable compiler:
2

Build

3

Run

Debug mode:
4

Install (optional)

Install rules are defined in Ladybird/cmake/InstallRules.cmake.

Resource Files

Ladybird requires resource files from serenity/Base/res for icons, fonts, and theming.
The serenity.sh script handles resource paths automatically. For custom builds:
  • Use ninja rules (ninja run, ninja debug)
  • Or install Ladybird with CMake install rules
  • Or manually set resource paths when running the binary

Experimental GN Build

The GN build is experimental and maintained on a best-effort basis.
Benefits:
  • More compact ninja rules
  • Potentially faster builds
  • Support for host and cross-targets in the same build directory
See the GN build instructions for details.

Platform-Specific Notes

OpenIndiana

Set CMake variables for Qt6 and Clang:
Replace 6.2 with your installed Qt version.

Haiku

No special configuration needed:

Debugging

CLion

1

Build with debug symbols

Edit Meta/CMake/lagom_compile_options.cmake:
  • Change -O2 to -O0
  • macOS: Change -g1 to -g
  • Linux: Change -g1 to -ggdb3
2

Run Ladybird

3

Attach debugger

In CLion:
  1. Run → Attach to Process
  2. Filter for WebContent
  3. Attach
For layout/rendering issues, attach to the WebContent process.

Xcode (macOS)

1

Generate Xcode project

2

Open in Xcode

3

Create scheme

Create a scheme for the Ladybird app bundle target.

Troubleshooting

Verify compiler version:
Install newer compiler if needed.
Ensure Qt6 development packages are installed:
Use the ninja rules:
Or ensure serenity/Base/res is accessible to the binary.
Update to Xcode 14.3+:
Or install Homebrew compiler:

Next Steps

Main Project

Visit the official Ladybird browser project

Advanced Build Options

Explore CMake options and customization