# [Open-Source] Web Browser Ladybird
###### tags: `Open Source` `Software` `GNU` `Linux` `Software Packaging` `Make` `System Design` `GUI` `Browser Engine` `Rendering Engine` `JavaScript Engine` `JIT` `Compiler` `JavaScript` `C` `C++` `Clang` `LLVM` `Web Technology` `Event Driven` `Operating System` `Computer Graphics` `Computer Networking` `Toolchain` `API` `App` `Protocol` `Cross Platform` `CSS` `Parser`
*Ladybird* is a truly independent web browser, using a novel engine based on web standards.
**Repo:** [ladybird - LadybirdBrowser - GitHub](https://github.com/LadybirdBrowser/ladybird)


:::info
**Related Articles**
- **GUI & graphics rendering concepts:** [GUI System on Linux - shibarashinu](https://hackmd.io/@shibarashinu/S1C42Zh50).
- **Browser architectures:** [Anatomy of Web Browser Engines - shibarashinu](https://hackmd.io/@shibarashinu/H1wrAk4o0).
- **JavaScript design & implementation:** [我所不知道的 JavaScript - shibarashinu](https://hackmd.io/@shibarashinu/BkAHFociR).
- **Compiler optimization tech, Program analysis:** [Compiler: The Program, the Language, & the Computer Work - shibarashinu](https://hackmd.io/@shibarashinu/SyEHz-JHC).
- **Program Debugging:** [Linux Kernel Debugging - shibarashinu](https://hackmd.io/@shibarashinu/ryyKT2wZR).
:::
## Resources
### Browser Cores
Development Process:
- [Launching Features - Chromium Docs](https://www.chromium.org/blink/launching-features/#exempt-features)
- [What are Blink Intents? - Chrome Dev](https://developer.chrome.com/docs/web-platform/blink-intents)
1. **web APIs:** spec standard discussion.
2. **"intent to prototype"/"intent to deprecate/remove":** implementation, discussion, testing with flags, bug feedbacks.
3. **"intent to experiment" (optional):** public web feature test with real-world feedbacks.
> via [Chrome's Origin Trial](https://developer.chrome.com/docs/web-platform/origin-trials) token.
>
> why:
> - [Motivation and Explainer - Origin Trials](https://googlechrome.github.io/OriginTrials/explainer.html)
> - [Origin Trials Framework for Web Features - Google Docs](https://docs.google.com/document/d/1qVP2CK1lbfmtIJRIm6nwuEFFhGhYbtThLQPo3CSTtmg/) (for details)
```C++=
bool OriginTrialsTest::throwingAttribute(ScriptState* script_state,
ExceptionState& exception_state) {
if (!RuntimeEnabledFeatures::OriginTrialsSampleAPIEnabled(
ExecutionContext::From(script_state))) {
exception_state.ThrowDOMException(
DOMExceptionCode::kNotSupportedError,
"The Origin Trials Sample API has not been enabled in this context");
return false;
}
return unconditionalAttribute();
}
```
- [origin_trials_test.cc](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/testing/origin_trials_test.cc)
- [runtime_enabled_features.json5](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/platform/runtime_enabled_features.json5)
4. **"intent to ship":** merge into Chrome's dev/test/rel production cycle (approval required from 3 Blink API owners).
- backend control:
1. Chrome variations: field trials flags set by Chrome server.
2. Chrome telemetry: data send
3. Chrome components
Browser History:
- [全面了解浏览器(内核)发展史 - 博客園](https://www.cnblogs.com/a3192048/p/12241334.html)
Browser Engine Architectures:
- [Chromium docs](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/README.md)
- [Design Documents - The Chromium Projects](https://www.chromium.org/developers/design-documents/)
- [[Slides] Mobile Browser Internal (Blink Rendering Engine) - Hyungwook Lee](https://www.slideshare.net/slideshow/mobilebrowserinternal-20140122/30471084)
- [Performance fundamentals - MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/Performance/Fundamentals)
- [浏览器渲染页面过程与页面优化 - Aus0049](https://segmentfault.com/a/1190000010298038)
- [深入了解CSS3硬件加速 - 掘金](https://juejin.cn/post/7140074945282834462)
- [重排(回流)和重绘,以及GPU加速那点事 - 掘金](https://juejin.cn/post/6868906622774935565)
Ladybird:
- [Andreas Kling - Ladybird: Building a new browser from scratch - Web Engines Hackfest](https://www.youtube.com/watch?v=De8N1zrQwRs)
- [Let's prototype a JavaScript JIT compiler! - Andreas Kling](https://www.youtube.com/watch?v=8mxubNQC5O8)
Security:
- [CVE-2024-7971 - National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2024-7971): **Type confusion** *(Access of Resource Using Incompatible Type)* in V8 in Google Chromium allowed a remote attacker to exploit heap corruption via a crafted HTML page & do remote code execution (RCE).
- [[2024/08/21] Security Fixes - Google Chrome Releases](https://chromereleases.googleblog.com/2024/08/stable-channel-update-for-desktop_21.html)
- [Dangerous Google Chrome Zero-Day Allows Sandbox Escape - Tara Seals - Dark Reading](https://www.darkreading.com/vulnerabilities-threats/dangerous-google-chrome-zero-day-sandbox-escape)
- [Fighting cookie theft using device bound sessions - Chromium Blog](https://blog.chromium.org/2024/04/fighting-cookie-theft-using-device.html)
- [Advancing key protection in Windows using VBS - Windows IT Pro blog](https://techcommunity.microsoft.com/t5/windows-it-pro-blog/advancing-key-protection-in-windows-using-vbs/ba-p/4050988)
- [Detecting browser data theft using Windows Event Logs - Google Security Blog](https://security.googleblog.com/2024/04/detecting-browser-data-theft-using.html): To obtain the DPAPI (Data Protection API) secret (e.g., Chromium's encrypted data storage, including Cookies & Passwords), malware can call as the user or at a higher privilege level as the browser does, which should be audited with system event logging.
- [XSS like you've never seen. - PwnFunction](https://www.youtube.com/watch?v=RLyhPGsEMz4): browser devtool bug vulnabilities.
Privacy:
- [Cover Your Tracks](https://coveryourtracks.eff.org/): Browser fingerprint collection.
- [看完Chrome漏洞報告之後,我發現大家的私密瀏覽記錄一直在被全網翻閱 - 差评硬件部](https://www.youtube.com/watch?v=oV6HhFAqriI): the functionality of CSS `:visited` may be a backdoor for the 3rd-party apps detecting whether the user has visited certain websites.
Web Technologies:
- CORS with `Access-Control-Allow-Origin` header
- [CORS Explained With Examples - pencilflip](https://www.youtube.com/watch?v=8J2TMmENhxU): cross-origin fetch vs. browser vs. server (with optional `{ credentials: "include" }`)
- QUIC network stack: Replace *TLS on TCP* with *QUIC on UDP*.
- [HTTP 1 vs HTTP 2 vs HTTP 3! - ByteByteGo](https://www.youtube.com/watch?v=UMwQjFzTQXw)
- [Deliver Fast, Reliable, and Secure Web Experiences with HTTP/3 - Akamai](https://www.akamai.com/blog/performance/deliver-fast-reliable-secure-web-experiences-http3)

- [QUIC核心原理和握手过程 - 技术蛋老师](https://www.youtube.com/watch?v=bDxUYOzSgaw)

- [CA/Browser Forum](https://cabforum.org/)
- [CRLSets - Chromium](https://www.chromium.org/Home/chromium-security/crlsets/): dynamic certificate revocation.
### JavaScript Standard
ECMAScript ECMA-262:
- [JavaScript reference - MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference)
- [[Spec] ECMA-262, 16th edition, June 2025 - ECMAScript® 2025 Language Specification](https://262.ecma-international.org/16.0/index.html)
- [ ] 4. Overview
- [ ] 5. Notational Conventions
- [ ] 6. ECMAScript Data Types and Values
- [ ] 7. Abstract Operations
- [ ] 8. Syntax-Directed Operations
- [ ] 9. Executable Code and Execution Contexts
- [ ] 10. Ordinary and Exotic Objects Behaviours
- [ ] ...
- [Exploring ES6](https://exploringjs.com/es6/index.html)
Test Suite:
- [[Intro] ECMAScript Language - test262](https://v8.github.io/test262/website/default.html)
- [tc39/test262 - GitHub](https://github.com/tc39/test262): A test suite intended to check agreement between JavaScript implementations and *ECMA-262*, the ECMAScript Language Specification (currently 5.1 Edition).
Platform Compatibiliy Overview:
- [test262.fyi](https://test262.fyi/)
### JavaScript Engines
V8:
- [V8 Project - V8 Dev](https://v8.dev)
- [V8 API Reference Guide - V8 Docs](https://v8docs.nodesource.com/node-16.15/index.html)
- [V8 Source Code - Git at Google](https://chromium.googlesource.com/v8/v8/)
### Vulkan Graphics Applications
Tutorial:
- [Learn - Vulkan](https://vulkan.org/learn)
Vulkan API spec:
- [Vulkan® 1.4.327 - A Specification (with all registered extensions) - Khronos](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html)
## Debugging Tools
### Web Browsers Application Tools
- **Firefox DevTools**
*Ladybird uses Firefox devtool client as the frontend for web page debugging.*

[about:debugging - Firefox](https://firefox-source-docs.mozilla.org/devtools-user/about_colon_debugging/index.html)
:::warning
[Firefox DevTools Integration - Ladybird](https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/DevTools.md)
> Logged messages beginning with `<<` were sent from the server (ladybird) to the client (firefox), vice versa.
We currently only implement a "frame" watcher. The debugger server (ladybird) will create a watcher associated with the inspected tab, and reply with a set of watcher options indicating our support of frame inspection:
```json!
>> {"type":"getWatcher","isServerTargetSwitchingEnabled":true,"isPopupDebuggingEnabled":false,"to":"server0-tab4"}
<< {"from":"server0-tab4","actor":"server0-watcher5","traits":{"shared_worker":false,"service_worker":false,"frame":true,"process":false,"worker":false,"resources":{"Cache":false,"console-message":false,"cookies":false,"css-change":false,"css-message":false,"css-registered-properties":false,"document-event":false,"error-message":false,"extension-storage":false,"indexed-db":false,"jstracer-state":false,"jstracer-trace":false,"last-private-context-exit":false,"local-storage":false,"network-event":false,"network-event-stacktrace":false,"platform-message":false,"reflow":false,"server-sent-event":false,"session-storage":false,"source":false,"stylesheet":false,"thread-state":false,"websocket":false}}}
```
The client then asks the server to watch the inspected tab's frame. The server must reply with multiple messages here.
The first message contains information about the inspected tab, as well as a list of other actors associated with the watcher. We are required to have an ++inspector actor++, a ++CSS properties actor++, and a ++thread actor++. We also have the optional ++console actor++. These actors are described below when they are requested by the client.
The second message contains a small set of information about the tab again. The third message is just an empty message,
which seems to indicate and end-of-transmission status:
```json!
>> {"type":"watchTargets","targetType":"frame","to":"server0-watcher5"}
<< {"from":"server0-watcher5","type":"target-available-form","target":{"actor":"server0-frame10","title":"xkcd: Scream Cipher","url":"https://xkcd.com/","browsingContextID":1,"outerWindowID":1,"isTopLevelTarget":true,"traits":{"frames":true,"isBrowsingContext":true,"logInPage":false,"navigation":true,"supportsTopLevelTargetFlag":true,"watchpoints":true},"cssPropertiesActor":"server0-css-properties6","consoleActor":"server0-console8","inspectorActor":"server0-inspector7","threadActor":"server0-thread9"}}
<< {"from":"server0-frame9","type":"frameUpdate","frames":[{"id":1,"title":"Ladybird","url":"https://ladybird.org/"}]}
<< {"from":"server0-watcher5"}
```
...
:::
- **Chrome DevTools**
- **Web App Debugging**
[Only The Best Developers Understand How This Works - Web Dev Simplified](https://www.youtube.com/watch?v=WqNqeMjd28I)
- **DevTools Use**
[Access local servers and Chrome instances with port forwarding - Chrome Dev](https://developer.chrome.com/docs/devtools/remote-debugging/local-server)

- **Intro**
[Chrome DevTools Protocol (CDP) - Chromium](https://chromium.googlesource.com/devtools/devtools-frontend/+/HEAD/docs/devtools-protocol.md)
- **Protocol API Docs**
- [Chrome DevTools Protocol - Chrome Devtools](https://chromedevtools.github.io/devtools-protocol/)
- [third_party/blink/public/devtools_protocol/browser_protocol.pdl - Chromium](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/devtools_protocol/browser_protocol.pdl)
```idl=
version
major 1
minor 3
experimental domain Accessibility
depends on DOM
# Unique accessibility node identifier.
type AXNodeId extends string
# Enum of possible property types.
type AXValueType extends string
enum
boolean
booleanOrUndefined
integer
node
nodeList
number
string
computedString
token
tokenList
...
```
### Qt GUI Application Tools
- [GammaRay - KDAB - GitHub](https://github.com/KDAB/GammaRay)
*Runtime Analysis Tools*
Introspect on Qt app's QObjects, QWidgets, QML elements, Qt 3D elements, ... visually at runtime. With remote debugging supported.
### Vulkan Graphics Driver Tools
- **`vulkan-tools`**
- Display system's Vulkan info
```sh!
vulkaninfo # --summary
```
- (User-space) Mesa3D's graphics driver info

- GPU's Vulkan driver: GPU's Vulkan graphics driver.
> `PHYSICAL_DEVICE_TYPE_DISCRETE_GPU`
:::info
**GPU's Vulkan Driver Example**

[Vulkan® Open Source Driver - AMD](https://gpuopen.com/amd-open-source-driver-for-vulkan/)
:::
- Mesa's software rendering driver: llvmpipe on CPU.
> `PHYSICAL_DEVICE_TYPE_CPU`
[Mesa 3D OpenGL Software Rendering (Gallium) - LLVMpipe, and OpenSWR Drivers - reddit](https://www.reddit.com/r/docker/comments/c9bdu3/mesa_3d_opengl_software_rendering_gallium/)
- Enable Vulkan desktop loader logging when running a Vulkan application:
```sh!
export VK_LOADER_DEBUG=all # error,warn,info,debug,layer,driver
./<vulkan-application>
```
- Vulkan validation layers
*Selective runtime checkers between Vulkan application & Vulkan driver.*
:::info
As Vulkan conformance test suite (CTS) is to Vulkan drivers, Vulkan validation layers is to Vulkan applications.
:::

> - A instance (vulkan context) call:
> 
>
> - A device (physical rendering hardware) call using `vkGetDeviceProcAddr`:
> 
>
> - A platform windowing system integration surface call:
> 
>
> - Layers:
> - A Vulkan layer manifest example in `/usr/share/vulkan/explicit_layer.d/` / `implicit_layer.d/`:
> 
>
> - ICD (Installable Client Drivers):
> - An ICD mainfest example in `/usr/share/vulkan/icd.d/`:
> 
>
> (Source: [[Slides] Vulkan Loader Deep Dive - Khronos](https://www.khronos.org/assets/uploads/developers/library/2017-vulkan-loader-webinar/VulkanLoaderDeepDive_Khronos_Mar17.pdf))
install:
```sh!
sudo apt install vulkan-validationlayers
```
verify:
```sh!
vulkaninfo | grep VK_LAYER_KHRONOS_validation
```
activate:
```sh!
# set the path of the json config for setting Vulkan validation layers
#export VK_LAYER_PATH=/usr/share/vulkan/explicit_layer.d
# activate Vulkan validation layers
export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
./<vulkan-application>
```
- `/usr/share/vulkan/explicit_layer.d/VkLayer_khronos_validation.json`
*The main, comprehensive Khronos validation layer.*
```json!
{
"file_format_version": "1.2.0",
"layer": {
"name": "VK_LAYER_KHRONOS_validation",
"type": "GLOBAL",
"library_path": "libVkLayer_khronos_validation.so",
"api_version": "1.3.275",
"implementation_version": "1",
"description": "Khronos Validation Layer",
"introduction": "The main, comprehensive Khronos validation layer.\n\nVulkan is an Explicit API, enabling direct control over how GPUs actually work. By design, minimal error checking is done inside a Vulkan driver. Applications have full control and responsibility for correct operation. Any errors in how Vulkan is used can result in a crash. \n\nThe Khronos Valiation Layer can be enabled to assist development by enabling developers to verify their applications correctly use the Vulkan API.",
"platforms": [
"WINDOWS",
"LINUX",
"ANDROID",
"MACOS"
],
"url": "https://vulkan.lunarg.com/doc/sdk/latest/windows/khronos_validation_layer.html",
...
}
}
```
[[Intro] Webinar: Vulkan Validation Layers Deep Dive (Sept 2016) - The Khronos Group](https://www.youtube.com/watch?v=zrhqnByvSHw)
[[Manual] Getting Started with the Linux Vulkan SDK - LunarXchange](https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/getting_started.html)
## Building Process
### Automation Build Systems
- **[Declarative](https://en.wikipedia.org/wiki/Declarative_programming) Change-Driven Build Systems**
*A tool that automates the software building (compiling) process.*
This includes automatically handles & solves *library dependencies*, *build/dev environment setup*, *target code generation*, *option/configuration settings*, ...


- **GN (Generate Ninja)** -> **Ninja**:
*Used by super large projects like Chromium & Fuchsia OS for performance.*
- [GN - Google Source](https://gn.googlesource.com/gn/)
- [Introduction to GN - Fuchsia Dev](https://fuchsia.dev/fuchsia-src/development/build/build_system/intro)
- **Cmake**, **Meson** -> **Ninja**:
*Use Meson (in Python), Cmake, ... to generate Ninja build files.*
- **Meson:** designed to be as invisible to the developer as possible, natively supports for modern tools (++precompiled headers++, ++coverage++, ++Valgrind++, ...).
[Comparing Meson with other build systems - The Meson Build system](https://mesonbuild.com/Comparisons.html)
- **Ninja:** faster than *make* when dealing with large projects especially with incremental changes.
[The Performance of Open Source Software Ninja - Evan Martin](https://aosabook.org/en/posa/ninja.html)
:::info
**[src + vcpkg] Cmake -> Ninja -> GCC -> Executables**
```sh!
# first, download & build the dependencies from vcpkg
vcpkg install <packages>
```
```sh!
cmake \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-G Ninja .. # use ../CMakeLists.txt to generate ./build.ninja
ninja -C <build-dir> --verbose # use ./build.ninja to download, build & compile
```
- `//CMakeLists.txt`
```Cmake=
cmake_minimum_required(VERSION 3.25)
if (VCPKG_TARGET_ANDROID)
# include vcpkg dependencies for Android:
# set VCPKG_TARGET_TRIPLET "arm64-android"
# set CMAKE_TOOLCHAIN_FILE ${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
# ...
include("UI/Android/vcpkg_android.cmake")
endif()
# find & set linker
include("Meta/CMake/use_linker.cmake")
if (APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
if (ENABLE_SWIFT)
set(CMAKE_OSX_DEPLOYMENT_TARGET 15.0)
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET 14.0)
endif()
endif()
# Pass additional information to vcpkg toolchain files if we are using vcpkg.
if (CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg.cmake$")
set(CMAKE_PROJECT_ladybird_INCLUDE_BEFORE "Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake")
endif()
if (APPLE AND NOT CMAKE_OSX_SYSROOT)
set(CMAKE_OSX_SYSROOT macosx)
endif()
project(ladybird
VERSION 0.1.0
LANGUAGES C CXX
DESCRIPTION "Ladybird Web Browser"
HOMEPAGE_URL "https://ladybird.org"
)
if (ANDROID OR IOS)
set(BUILD_SHARED_LIBS OFF)
endif()
set(LADYBIRD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LADYBIRD_SOURCE_DIR}/Meta/CMake")
include(UI/cmake/EnableLagom.cmake)
include(lagom_options NO_POLICY_SCOPE)
include(lagom_compile_options)
add_cxx_compile_options(-Wno-expansion-to-defined)
add_cxx_compile_options(-Wno-user-defined-literals)
if (ENABLE_QT AND ENABLE_GUI_TARGETS)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
endif()
# We need to find OpenSSL in order to link it explicitly with all targets.
find_package(OpenSSL REQUIRED)
include(CTest) # for BUILD_TESTING option, default ON
if (ENABLE_GUI_TARGETS)
add_subdirectory(Services)
add_subdirectory(UI)
endif()
add_custom_target(lint-shell-scripts
COMMAND "${ladybird_SOURCE_DIR}/Meta/lint-shell-scripts.sh"
USES_TERMINAL
)
```
- **Cmake**, **GNU Autotools** -> **Make**:
*Use Cross-platform Cmake or GNU autotools (automake, autoconfig) that will generate proper `Makefile` which will then be consumed by make.*
> 
> 
>
> (Source: [The basics of Autotools - Gentoo Linux Dev](https://devmanual.gentoo.org/general-concepts/autotools/index.html))
- **Vcpkg -- C++ Cross-Platform Software / Library Packaging Manager**
*Something like `npm` to Node.js, `pip` to Python.*
- Resolves the toolchain & utils library packages of upstream vendor dependencies, versions, patches, & build.
- Compile settings.
- Development environment settings.
- Target code preference managment.
- Pre-/Post-build & clean process setup.
- Run environment settings.
> [Search and Explore Vcpkg Ports - vcpkg.link](https://vcpkg.link/)
[CMake + Vcpkg 软件构建实战 - 奇乐编程学院](https://www.youtube.com/watch?v=dIs7TFBDbIw)
- **Compiler Toolchains:** *clang/llvm*, *gcc*, ...
- **`compile_commands.json`:** records how the files are compiled.
For some tools e.g., lsp tools (*clangd*), static analysis tools (*clang-tidy*), ... want to do with the compilation without relying the change-driven build system.
[JSON Compilation Database Format Specification - Clang LLVM Docs](https://clang.llvm.org/docs/JSONCompilationDatabase.html)
- **Ccache:** caches the compiler outputs.
*If often running `make; make clean`, caching compilation results could help recompile faster.*
[Ccache — a fast C/C++ compiler cache](https://ccache.dev/)
> 
> (Source: [C/C++ Building Optimization - Guilherme Ferreira - Medium](https://medium.com/@guilhermeprogrammer/c-c-building-optimization-328334c90099))
### Build Process Setup
1. Setup & Config Build Environment
- **Primary Build System:** Cmake.
- **Primary Compiler:** Clang.
- Compilation/Linking flags
[Chromium 在 link 時用的參數 - Medium](https://medium.com/fcamels-notes/chromium-%E5%9C%A8-link-%E6%99%82%E7%94%A8%E7%9A%84%E5%8F%83%E6%95%B8-e301a1f1d908)
- **C++ Package Manager:** Vcpkg.
- Config
*Set by Cmake build system.*
```sh=
# Preset CMake variables
CMAKE_BUILD_TYPE="RelWithDebInfo"
CMAKE_TOOLCHAIN_FILE="~/projects/ladybird/Toolchain/Tarballs/vcpkg/scripts/buildsystems/vcpkg.cmake"
SERENITY_CACHE_DIR="~/projects/ladybird/Build/caches"
VCPKG_INSTALL_OPTIONS="--no-print-usage"
VCPKG_OVERLAY_TRIPLETS="~/projects/ladybird/Meta/CMake/vcpkg/release-triplets"
# Preset build environment variables
LADYBIRD_SOURCE_DIR="~/projects/ladybird"
VCPKG_BINARY_SOURCES="clear;files,~/projects/ladybird/Toolchain/Build/vcpkg-binary-cache,readwrite"
VCPKG_ROOT="~/projects/ladybird/Toolchain/Tarballs/vcpkg"
```
- Installing Vcpkg C++ packages
```sh
Installing fontconfig:x64-linux@2.14.2#1...
Building fontconfig:x64-linux@2.14.2#1...
~/projects/ladybird/Meta/CMake/vcpkg/release-triplets/x64-linux.cmake: info: loaded overlay triplet from here
~/projects/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/versioning_/versions/fontconfig/de73339d579963e68fed652ed2e206b307a0c03f: info: installing overlay port from here
-- Found Python version '3.11.2 at /usr/bin/python3'
-- Using meson: ~/projects/ladybird/Toolchain/Tarballs/vcpkg/downloads/tools/meson-1.3.2-6f83ac/meson.py
-- Downloading https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.14.2/fontconfig-2.14.2.tar.gz -> fontconfig-fontconfig-2.14.2.tar.gz...
-- Extracting source ~/projects/ladybird/Toolchain/Tarballs/vcpkg/downloads/fontconfig-fontconfig-2.14.2.tar.gz
-- Applying patch no-etc-symlinks.patch
-- Applying patch libgetopt.patch
-- Applying patch fix-preprocessor-clang-cl.patch
-- Using source at ~/projects/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/fontconfig/src/2.14.2-7f52ee670b.clean
-- Found external ninja('1.11.1').
-- Configuring x64-linux-rel
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-rel done
-- Package x64-linux-rel
-- Fixing pkgconfig file: ~/projects/ladybird/Toolchain/Tarballs/vcpkg/packages/fontconfig_x64-linux/lib/pkgconfig/fontconfig.pc
-- Installing: ~/projects/ladybird/Toolchain/Tarballs/vcpkg/packages/fontconfig_x64-linux/share/fontconfig/usage
-- Installing: ~/projects/ladybird/Toolchain/Tarballs/vcpkg/packages/fontconfig_x64-linux/share/fontconfig/copyright
-- Adjusted RPATH of '~/projects/ladybird/Toolchain/Tarballs/vcpkg/packages/fontconfig_x64-linux/tools/fontconfig/fc-cache' (From '' -> To '$ORIGIN:$ORIGIN/../../lib')
-- Adjusted RPATH of '~/projects/ladybird/Toolchain/Tarballs/vcpkg/packages/fontconfig_x64-linux/tools/fontconfig/fc-cat' (From '' -> To '$ORIGIN:$ORIGIN/../../lib')
-- Adjusted RPATH of '~/projects/ladybird/Toolchain/Tarballs/vcpkg/packages/fontconfig_x64-linux/tools/fontconfig/fc-conflist' (From '' -> To '$ORIGIN:$ORIGIN/../../lib')
-- ...
-- Performing post-build validation
Stored binaries in 1 destinations in 1.4 s.
Elapsed time to handle fontconfig:x64-linux: 15 s
fontconfig:x64-linux package ABI: ee8b31fcfd1f6e15629d85663d6677d73b5f48ca9117c59a97d86fe12d09f424
```
- Target triplet
```sh!
x64-linux-dynamic (sharedlibrary) -dbg (debug) / -rel (release)
```
[Target Triplet - OSDev Wiki](https://wiki.osdev.org/Target_Triplet)
:::info
**List of Installed Vcpkg Packages for Ladybird**
- **brotli:** A compression library optimized for fast and dense web content compression.
- **bzip2:** A high-quality data compression library using the Burrows-Wheeler algorithm.
- **dav1d:** An AV1 decoder optimized for speed and efficiency on various platforms.
- **dirent:** A compatibility library for managing directory entries across different operating systems.
- **egl-registry:** A repository of EGL API interfaces and extensions for rendering APIs.
- **expat:** A fast XML parser library used in a wide variety of applications.
- **fontconfig:** A library for configuring and customizing font access on a system.
- **freetype:** A library for rendering fonts, supporting various font formats.
> [FreeType - freedesktop.org](https://gitlab.freedesktop.org/freetype/freetype)
- **getopt:** A library for parsing command-line options in programs.
- **gettext:** A library for internationalizing and localizing software text messages.
- **gettext-libintl:** The GNU implementation of the libintl library for message translation.
- **giflib:** A library for handling GIF image format, including decoding and encoding.
- **gperf:** A perfect hash function generator, useful for optimizing search tasks.
- **harfbuzz:** An open-source text shaping engine for converting Unicode text into glyph indices.
- **highway:** A library for SIMD (Single Instruction, Multiple Data) parallel processing.
- **icu[core,tools]:** A comprehensive library for Unicode and globalization support, with tools for data manipulation.
- **lcms:** Little Color Management System, a library for color profile management.
- **libavif[core,dav1d]:** A library for encoding and decoding AVIF image format, utilizing dav1d for AV1 decoding.
- **libiconv:** A library for converting between different character encodings.
- **libjpeg-turbo:** A high-speed JPEG image compression and decompression library.
- **libjxl:** A library for encoding and decoding JPEG XL image format.
- **liblzma:** A compression library for the LZMA (Lempel-Ziv-Markov chain) algorithm.
- **libpng[apng,core]:** A library for reading and writing PNG (Portable Network Graphics) image format, with APNG support.
- **libuuid:** A library for generating unique identifiers (UUIDs).
- **libwebp[anim,core,img2webp,libwebpmux,mux,nearlossless,simd]:** A library for encoding and decoding WebP images, with advanced - features for animations, muxing, and SIMD optimization.
- **libyuv:** A library for handling YUV image format conversions and processing.
- **opengl-registry:** A collection of OpenGL API interfaces and extensions.
- **pkgconf:** A tool and library for managing compile and link flags for libraries.
- **pthread:** A POSIX thread library for managing multiple threads in programs.
- **simdutf:** A library for high-performance UTF-8/UTF-16 string processing using SIMD instructions.
- **skia[core,fontconfig,freetype,gl,harfbuzz,icu,vulkan]:** A 2D graphics library supporting multiple backends, including GL & Vulkan, with integrated text rendering, paths, & Bezier curves.
- **sqlite3[core,json1]:** A lightweight, file-based SQL database engine with JSON support.
- **tiff[core,jpeg,lzma,zip]:** A library for handling the `TIFF` (Tagged Image File Format) with support for compression and other formats.
- **vcpkg-cmake:** A CMake tool for managing and building packages using vcpkg.
- **vcpkg-cmake-config:** A CMake configuration module for packages built with vcpkg.
- **vcpkg-cmake-get-vars:** A tool to retrieve CMake variables from vcpkg-installed packages.
- **vcpkg-gn:** A GN build system integration for packages managed by vcpkg.
- **vcpkg-pkgconfig-get-modules:** A tool for retrieving pkg-config modules from vcpkg-installed packages.
- **vcpkg-tool-gn:** A GN build system tool for vcpkg.
- **vcpkg-tool-meson:** A Meson build system tool for vcpkg.
- **vulkan:** A modern, low-overhead graphics and compute API.
- **vulkan-headers:** The official Vulkan API header files.
- **vulkan-memory-allocator:** A library for managing memory allocation in Vulkan applications.
- **woff2:** A library for encoding and decoding WOFF2 (Web Open Font Format 2) files.
- **zlib:** A widely-used data compression library supporting the deflate compression algorithm.
:::