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)
- Debian/Ubuntu
- Arch Linux/Manjaro
- Fedora
- openSUSE
- macOS
- NixOS/Nix
- OpenIndiana
- Haiku
- Windows
Building with serenity.sh
The simplest way to build Ladybird:Browser Chrome
The build uses different browser chromes depending on platform:- macOS
- Linux/Others
AppKit - Native macOS chrome
Enabling Qt Chrome
To build the Qt chrome on platforms where it’s not default:Disabling Ladybird
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
- Using Ninja
- Direct (Linux)
- Direct (macOS)
4
Install (optional)
Install rules are defined in
Ladybird/cmake/InstallRules.cmake.Resource Files
Theserenity.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.
- More compact ninja rules
- Potentially faster builds
- Support for host and cross-targets in the same build directory
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
-O2to-O0 - macOS: Change
-g1to-g - Linux: Change
-g1to-ggdb3
2
Run Ladybird
3
Attach debugger
In CLion:
- Run → Attach to Process
- Filter for
WebContent - Attach
For layout/rendering issues, attach to the WebContent process.
Xcode (macOS)
1
Generate Xcode project
- Compatible with serenity.sh
- Standalone
2
Open in Xcode
3
Create scheme
Create a scheme for the Ladybird app bundle target.
Troubleshooting
Build fails with C++26 errors
Build fails with C++26 errors
Verify compiler version:Install newer compiler if needed.
Qt6 not found
Qt6 not found
Ensure Qt6 development packages are installed:
Resource files missing
Resource files missing
Use the ninja rules:Or ensure
serenity/Base/res is accessible to the binary.Xcode 14.2 or older crashes
Xcode 14.2 or older crashes
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
