# ladybirdbrowser/ladybird architecture

> Architecture diagram of the GitHub repository ladybirdbrowser/ladybird, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ladybirdbrowser/ladybird
- Repository: https://github.com/ladybirdbrowser/ladybird

## Overview

Ladybird is an independent, multi-process web browser. The principal workflow is a user action in the browser UI leading to page loading, WebContent rendering, and compositing for display. The README documents the process roles and major engine capabilities; the tree and source index identify implementation areas. Because most runtime wiring was not sampled, cross-process workflow links below are dashed and unverified. The sampled compositing references support a few internal relationships; this is not a complete call graph.

Main entry points: [`Services/WebContent/main.cpp`](https://github.com/ladybirdbrowser/ladybird/blob/master/Services/WebContent/main.cpp) (WebContent), [`Libraries/LibWeb`](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibWeb) (Web engine), [`Libraries/LibCompositing/Rust/src/display_list/commands.rs`](https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/commands.rs) (Display-list commands), [`Libraries/LibCompositing/Rust/src/display_list/storage.rs`](https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/storage.rs) (Display-list storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser runtime"]
  node_ui["Browser UI<br/>[Application.cpp]"]
  node_webcontent["WebContent<br/>[main.cpp]"]
  node_request["RequestServer<br/>[main.cpp]"]
  node_decoder["ImageDecoder<br/>[main.cpp]"]
end

subgraph group_web["Web platform"]
  node_webengine["Web engine"]
  node_js["JavaScript engine"]
  node_wasm["WebAssembly"]
  node_devtools["Developer tools"]
end

subgraph group_render["Rendering"]
  node_compositor["Compositor service"]
  node_displaylist["Display-list builder<br/>[builder.rs]"]
  node_commands["Display-list commands<br/>[commands.rs]"]
  node_storage["Display-list storage<br/>[storage.rs]"]
  node_visual["Visual contexts<br/>[mod.rs]"]
end

subgraph group_support["Platform services"]
  node_core["OS and event loop"]
  node_ipc["Process communication"]
  node_network["HTTP and TLS"]
  node_graphics["Graphics and media"]
  node_crypto["Cryptography"]
  node_unicode["Unicode and locale"]
end

node_user(("User"))

node_user -.->|"interacts"| node_ui
node_ui -.->|"requests rendering"| node_webcontent
node_webcontent -.->|"requests network"| node_request
node_request -.->|"loads resources"| node_network
node_webcontent -.->|"requests decoding"| node_decoder
node_webcontent -.->|"renders pages"| node_webengine
node_webengine -.->|"runs scripts"| node_js
node_webengine -.->|"runs modules"| node_wasm
node_webcontent -.->|"submits display data"| node_compositor
node_displaylist -->|"encodes"| node_commands
node_storage -->|"references"| node_displaylist
node_storage -->|"uses"| node_commands
node_visual -->|"uses"| node_commands
node_webcontent -.->|"communicates via"| node_ipc
node_compositor -.->|"communicates via"| node_ipc
node_webengine -.->|"uses rendering support"| node_graphics
node_webengine -.->|"uses text support"| node_unicode
node_network -.->|"uses TLS primitives"| node_crypto

click node_ui "https://github.com/ladybirdbrowser/ladybird/blob/master/UI/Qt/Application.cpp"
click node_webcontent "https://github.com/ladybirdbrowser/ladybird/blob/master/Services/WebContent/main.cpp"
click node_request "https://github.com/ladybirdbrowser/ladybird/blob/master/Services/RequestServer/main.cpp"
click node_decoder "https://github.com/ladybirdbrowser/ladybird/blob/master/Services/ImageDecoder/main.cpp"
click node_webengine "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibWeb"
click node_js "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibJS"
click node_wasm "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibWasm"
click node_devtools "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibDevTools"
click node_compositor "https://github.com/ladybirdbrowser/ladybird/blob/master/Services/Compositor/ScrollSnapController.cpp"
click node_displaylist "https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/builder.rs"
click node_commands "https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/commands.rs"
click node_storage "https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/storage.rs"
click node_visual "https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/visual_context/mod.rs"
click node_core "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibCore"
click node_ipc "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibIPC"
click node_network "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibHTTP"
click node_graphics "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibGfx"
click node_crypto "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibCrypto"
click node_unicode "https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibUnicode"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ui,node_webcontent,node_request,node_decoder,node_user toneBlue
class node_webengine,node_js,node_wasm,node_devtools toneAmber
class node_compositor,node_displaylist,node_commands,node_storage,node_visual toneMint
class node_core,node_ipc,node_network,node_graphics,node_crypto,node_unicode toneRose
```

## Components

### Browser runtime

- [Browser UI](https://github.com/ladybirdbrowser/ladybird/blob/master/UI/Qt/Application.cpp): `UI/Qt/Application.cpp`
- [WebContent](https://github.com/ladybirdbrowser/ladybird/blob/master/Services/WebContent/main.cpp): `Services/WebContent/main.cpp`
- [RequestServer](https://github.com/ladybirdbrowser/ladybird/blob/master/Services/RequestServer/main.cpp): `Services/RequestServer/main.cpp`
- [ImageDecoder](https://github.com/ladybirdbrowser/ladybird/blob/master/Services/ImageDecoder/main.cpp): `Services/ImageDecoder/main.cpp`

### Web platform

- [Web engine](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibWeb): `Libraries/LibWeb`
- [JavaScript engine](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibJS): `Libraries/LibJS`
- [WebAssembly](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibWasm): `Libraries/LibWasm`
- [Developer tools](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibDevTools): `Libraries/LibDevTools`

### Rendering

- [Compositor service](https://github.com/ladybirdbrowser/ladybird/blob/master/Services/Compositor/ScrollSnapController.cpp): `Services/Compositor/ScrollSnapController.cpp`
- [Display-list builder](https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/builder.rs): `Libraries/LibCompositing/Rust/src/display_list/builder.rs`
- [Display-list commands](https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/commands.rs): `Libraries/LibCompositing/Rust/src/display_list/commands.rs`
- [Display-list storage](https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/display_list/storage.rs): `Libraries/LibCompositing/Rust/src/display_list/storage.rs`
- [Visual contexts](https://github.com/ladybirdbrowser/ladybird/blob/master/Libraries/LibCompositing/Rust/src/visual_context/mod.rs): `Libraries/LibCompositing/Rust/src/visual_context/mod.rs`

### Platform services

- [OS and event loop](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibCore): `Libraries/LibCore`
- [Process communication](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibIPC): `Libraries/LibIPC`
- [HTTP and TLS](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibHTTP): `Libraries/LibHTTP`
- [Graphics and media](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibGfx): `Libraries/LibGfx`
- [Cryptography](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibCrypto): `Libraries/LibCrypto`
- [Unicode and locale](https://github.com/ladybirdbrowser/ladybird/tree/master/Libraries/LibUnicode): `Libraries/LibUnicode`

### Other components

- **User**

## Connections

- User → Browser UI: interacts
- Browser UI → WebContent: requests rendering
- WebContent → RequestServer: requests network
- RequestServer → HTTP and TLS: loads resources
- WebContent → ImageDecoder: requests decoding
- WebContent → Web engine: renders pages
- Web engine → JavaScript engine: runs scripts
- Web engine → WebAssembly: runs modules
- WebContent → Compositor service: submits display data
- Display-list builder → Display-list commands: encodes (evidence: `Libraries/LibCompositing/Rust/src/display_list/builder.rs`)
- Display-list storage → Display-list builder: references (evidence: `Libraries/LibCompositing/Rust/src/display_list/storage.rs`)
- Display-list storage → Display-list commands: uses (evidence: `Libraries/LibCompositing/Rust/src/display_list/storage.rs`)
- Visual contexts → Display-list commands: uses (evidence: `Libraries/LibCompositing/Rust/src/visual_context/mod.rs`)
- WebContent → Process communication: communicates via
- Compositor service → Process communication: communicates via
- Web engine → Graphics and media: uses rendering support
- Web engine → Unicode and locale: uses text support
- HTTP and TLS → Cryptography: uses TLS primitives
