The Servo Browser Engine
  • HTML 74.2%
  • JavaScript 13.5%
  • Rust 7.6%
  • Python 3.1%
  • GLSL 1.1%
  • Other 0.3%
Find a file
Oriol Brufau 8ff3fb5f24
layout: Add testing API for counting restyled and rebuilt fragments (#42817)
Now `ServoTestUtils.forceLayout()` will provide the number of fragments
that have been restyled and rebuilt. This will be useful to test that
incremental layout works well.

Testing: Adds a test using this new API

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-02-25 16:57:13 +00:00
.cargo Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
.config Upload junit report of unit-tests in CI (#39897) 2025-11-17 15:07:56 +00:00
.devcontainer Bump rust version to 1.92.0 (#42661) 2026-02-16 18:58:15 +00:00
.github CI: Always switch apt mirrors before apt (#42819) 2026-02-24 16:16:29 +00:00
.vscode use ruff rather than flake8 for python code linting (#37045) 2025-05-24 14:19:47 +00:00
components layout: Add testing API for counting restyled and rebuilt fragments (#42817) 2026-02-25 16:57:13 +00:00
docs deps: Merge the servo/media repository (#42369) 2026-02-06 17:00:03 +00:00
etc etc: Add script to vendor all dependencies, modify the toml and create an archive (#42507) 2026-02-19 03:21:21 +00:00
ports/servoshell libservo: Add allow_virtual_keyboard flag for InputMethodControl (#42467) 2026-02-24 07:30:49 +00:00
python script: Remember which nodes the devtools know about (#42785) 2026-02-25 12:35:52 +00:00
resources devtools: Get the correct debuggee in debugger.js (#42774) 2026-02-23 11:00:48 +00:00
support ohos CI: Ignore certificate errors for hitrace-bencher (#42683) 2026-02-18 08:36:01 +00:00
tests layout: Add testing API for counting restyled and rebuilt fragments (#42817) 2026-02-25 16:57:13 +00:00
third_party Refactor allow to expect (#41586) 2026-01-01 13:40:20 +00:00
.gitattributes git: Mark tests/blink_perf_tests as linguist-vendored (#39036) 2025-08-30 13:11:32 +00:00
.gitignore mach: use uv run --frozen (#42169) 2026-02-03 12:43:04 +00:00
.mailmap Update Tetsuharu OHZEKI's entry in mailmap 2019-11-15 00:46:45 +09:00
.python-version Set python version to 3.11 (#34707) 2024-12-19 18:42:36 +00:00
about.toml Add servo:license (#40319) 2025-11-13 08:48:01 +00:00
Cargo.lock build: bump rustls from 0.23.36 to 0.23.37 (#42831) 2026-02-25 01:08:36 +00:00
Cargo.toml build: bump the gstreamer-related group with 29 updates (#42760) 2026-02-23 00:55:57 +00:00
CODE_OF_CONDUCT.md Clarify the Code of Conduct (closes servo/servo.org#164) (#32835) 2024-07-23 09:12:03 +00:00
CONTRIBUTING.md Update contributing guide URL. (#41192) 2025-12-11 07:50:34 +00:00
deny.toml Bump accesskit version and patch egui to use updated accesskit (#42402) 2026-02-20 03:01:44 +00:00
Info.plist Bump servoshell to 0.0.5 (#42305) 2026-02-03 14:05:55 +00:00
LICENSE Update MPL license to https (part 1) 2018-11-19 14:46:43 +01:00
LICENSE_WHATWG_SPECS Add license for WHATWG specifications in code (#36282) 2025-04-03 04:33:06 +00:00
mach mach: use uv run --frozen (#42169) 2026-02-03 12:43:04 +00:00
mach.bat mach: Force the use of arm64 Python when running with Windows on arm64 (#42371) 2026-02-06 02:58:37 +00:00
mach.ps1 mach: Force the use of arm64 Python when running with Windows on arm64 (#42371) 2026-02-06 02:58:37 +00:00
PULL_REQUEST_TEMPLATE.md Use a simpler GitHub pull request template (#36203) 2025-03-30 10:14:13 +00:00
pyproject.toml python: Run flake8 on WPT tooling to match upstream. (#42823) 2026-02-24 20:00:10 +00:00
README.md doc: Refer to the correct links in the Servo Book (#41110) 2025-12-06 23:42:35 +00:00
rust-toolchain.toml Bump rust version to 1.92.0 (#42661) 2026-02-16 18:58:15 +00:00
rustfmt.toml Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
SECURITY.md docs(security): avoid possible misconception in the security policy (#37032) 2025-05-16 21:27:42 +00:00
servo-tidy.toml tests: Vendor blink perf tests (#38654) 2025-08-17 09:54:04 +00:00
servobuild.example Fix DBus warning when running mach (#37818) 2025-07-02 23:17:01 +00:00
shell.nix NixOS: fix missing library errors when running libservo tests (#42835) 2026-02-25 12:10:45 +00:00
taplo.toml Format toml files (#30112) 2023-08-17 15:07:43 +00:00
uv.lock build: bump werkzeug from 3.1.5 to 3.1.6 (#42723) 2026-02-20 04:11:31 +00:00

The Servo Parallel Browser Engine Project

Servo is a prototype web browser engine written in the Rust language. It is currently developed on 64-bit macOS, 64-bit Linux, 64-bit Windows, 64-bit OpenHarmony, and Android.

Servo welcomes contribution from everyone. Check out:

Coordination of Servo development happens:

Getting started

For more detailed build instructions, see the Servo Book under Getting the Code and Building Servo.

macOS

  • Download and install Xcode and brew.
  • Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
  • Install rustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Restart your shell to make sure cargo is available
  • Install the other dependencies: ./mach bootstrap
  • Build servoshell: ./mach build

Linux

  • Install curl:
    • Arch: sudo pacman -S --needed curl
    • Debian, Ubuntu: sudo apt install curl
    • Fedora: sudo dnf install curl
    • Gentoo: sudo emerge net-misc/curl
  • Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
  • Install rustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Restart your shell to make sure cargo is available
  • Install the other dependencies: ./mach bootstrap
  • Build servoshell: ./mach build

Windows

  • Download uv, choco, and rustup
    • Be sure to select Quick install via the Visual Studio Community installer
  • In the Visual Studio Installer, ensure the following components are installed:
    • Windows 10/11 SDK (anything >= 10.0.19041.0) (Microsoft.VisualStudio.Component.Windows{10, 11}SDK.{>=19041})
    • MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
    • C++ ATL for latest v143 build tools (x86 & x64) (Microsoft.VisualStudio.Component.VC.ATL)
  • Restart your shell to make sure cargo is available
  • Install the other dependencies: .\mach bootstrap
  • Build servoshell: .\mach build

Android

  • Ensure that the following environment variables are set:
    • ANDROID_SDK_ROOT
    • ANDROID_NDK_ROOT: $ANDROID_SDK_ROOT/ndk/28.2.13676358/ ANDROID_SDK_ROOT can be any directory (such as ~/android-sdk). All of the Android build dependencies will be installed there.
  • Install the latest version of the Android command-line tools to $ANDROID_SDK_ROOT/cmdline-tools/latest.
  • Run the following command to install the necessary components:
    sudo $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install \
     "build-tools;34.0.0" \
     "emulator" \
     "ndk;28.2.13676358" \
     "platform-tools" \
     "platforms;android-33" \
     "system-images;android-33;google_apis;x86_64"
    
  • Follow the instructions above for the platform you are building on

OpenHarmony

  • Follow the instructions above for the platform you are building on to prepare the environment.
  • Depending on the target distribution (e.g. HarmonyOS NEXT vs pure OpenHarmony) the build configuration will differ slightly.
  • Ensure that the following environment variables are set
    • DEVECO_SDK_HOME (Required when targeting HarmonyOS NEXT)
    • OHOS_BASE_SDK_HOME (Required when targeting OpenHarmony)
    • OHOS_SDK_NATIVE (e.g. ${DEVECO_SDK_HOME}/default/openharmony/native or ${OHOS_BASE_SDK_HOME}/${API_VERSION}/native)
    • SERVO_OHOS_SIGNING_CONFIG: Path to json file containing a valid signing configuration for the demo app.
  • Review the detailed instructions at [Building for OpenHarmony].
  • The target distribution can be modified by passing --flavor=<default|harmonyos> to mach <build|package|install>.