Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Structure

  • components
    • allocator — Selects the default global allocator for Servo, and exposing common allocator introspection APIs for memory profiling.
    • background_hang_monitor — Code for detecting hangs in child constellation/script threads.
    • bluetooth — Implementation of the bluetooth thread.
    • canvas — Implementation of painting threads for 2D and WebGL canvases.
    • config — Exposes opts for inital read only configuration, and prefs for runtime configuration.
    • constellation — Management of resources for a top-level browsing context (ie. tab).
    • default-resources — A default resource reader that provides baked-in resources.
    • devtools — In-process server to allow manipulating browser instances via a remote Firefox developer tools client.
    • dom_struct — Macro for defining Rust structs that implement WebIDL interfaces.
    • fonts — Code for dealing with fonts and text shaping.
    • geometry — Provides units and helper functions for use with euclid.
    • hyper_serde — Provides wrappers and convenience functions to support Serde for some types defined in cookie, hyper, mime and time.
    • jstraceable_derive — Derive macro implmenting JSTracable for types in the [script]-related crates.
    • layout — Converts page content into positioned, styled boxes and passes the result to the renderer.
    • malloc_size_of — Measures heap usage of data structures.
    • media — Implementation of multimedia-related functionality, abstracting over GStreamer and OpenHarmony.
    • metrics — A data structure to track web metrics defined in various specifications.
    • net — Network protocol implementations, and state and resource management (caching, cookies, etc.).
    • paint — Integration with OS windowing/rendering and event loop.
    • pixels — Helper functions relating to image/pixel manipulation and decoding
    • profile — Memory and time profilers.
    • script — Implementation of the DOM (native Rust code and bindings to SpiderMonkey).
    • script_bindings - Support code and bindings generated from WebIDL files. The bindings consist of traits representing WebIDL interfaces and glue code for the SpiderMonkey JavaScript engine. The actual trait implementations are located in the script crate. These are split into two crates in order to improve the speed of incremental builds.
    • servo — Entry points for the servo application and libservo embedding library.
    • script_webgpu — Implementation of WebGPU web specification.
    • servo_tracing — Servo-specific macros for integration with the tracing crate.
    • shared — Shared traits/code used by multiple components that don’t want to depend on the main crate for build speed reasons.
    • storage — Persistent storage backend for LocalStorage/IndexedDB.
    • timers — Logic for scheduling and running asynchronous timers with callbacks.
    • url — Implementation of URL-related concepts like blobs and origins.
    • wakelock — Interface for platform-specific wakelock/screen lock implementation.
    • webdriver_server — In-process server to allow manipulating browser instances via a WebDriver client.
    • webgl — Integration with native accelerated rendering for WebGL.
    • webgpu — Implementation of threads for the WebGPU API.
    • webvtt — Captions and subtitles.
    • webxr — OpenXR intergration for virtual reality and augmented reality devices.
    • xpath — Implementation of XPath specification.
  • etc — Useful tools and scripts for developers.
  • ports
    • servoshell — The example browser that uses servo.
  • python
    • mach — A command-line tool to help with developer tasks.
    • servo — Implementations of servo-specific mach commands.
    • tidy — Python package of code lints that are automatically run before merging changes.
  • resources — Files used at run time. Need to be included somehow when distributing binary builds.
  • support
    • android — Libraries that require special handling for building for Android platforms
  • target
    • debug — Build artifacts generated by ./mach build --debug.
    • doc — Documentation is generated here by the rustdoc tool when running ./mach doc
    • release — Build artifacts generated by ./mach build --release.
  • tests
    • dromaeo — Harness for automatically running the Dromaeo testsuite.
    • html — Manual tests and experiments.
    • jquery — Harness for automatically running the jQuery testsuite.
    • power — Tools for measurement of power consumption.
    • unit — Unit tests using rustc’s built-in test harness.
    • wpt — W3C web-platform-tests and csswg-tests along with tools to run them and expected failures.

Repositories

The Servo project maintains a number of repositories that are either released independently of Servo or are forked from an upstream project.

Widely-used in Rust ecosystem

Forks

  • mozjs: Servo’s fork of SpiderMonkey and Rust bindings
  • stylo: Servo’s CSS implementation with regular synchronization with the upstream version in the Gecko repository
  • webrender: A fork of Firefox’s WebRender with a few small changes for Servo

Servo-internal

  • book: This book!
  • ci-runners: Scripts and tools used for Servo’s CI (continuous integration)
  • malloc_size_of: Measure the runtime size of values
  • servo: The main repository for the Servo web platform engine
  • surfman: Low-level cross-platform Rust library for managing graphic surfaces
  • wpt: Servo’s fork of the Web Platform Tests

Historical repos