Skip to content
brson edited this page Dec 4, 2012 · 65 revisions

Overview and goals

Servo is a research project to develop a new parallel web browser engine. It has two primary goals: to prevent common, exploitable security errors using strong, static typing; and to design an architecture that takes advantage of parallelism at many levels. Servo is explicitly not aiming to create a full web browser - it is focused on just the engine, not the chrome.

To those ends Servo is written in Rust, a new language designed specifically with Servo's requirements in mind. Rust provides a strong type system, task-based parallelism, and data-race freedom.

Some more specific near-term goals:

  • Task-based architecture - major components in the system should be factored into actors with isolated heaps. This alone will provide some incidental parallelism, but more importantly will force the system to be decomposed types and interfaces that are most amenable to future parallel research.
  • JavaScript and layout run in parallel
  • Parallel rendering
  • Multiprocess architecture

The task architecture

Each engine instance can for now be thought of as a single tab or window, and manages a pipeline of tasks that accepts input, runs JavaScript against the DOM, performs layout, builds display lists, renders display lists to tiles and finally composites the final image to a surface.

The pipeline consists of three main tasks:

  • Content - Content's primary mission is to create and own the DOM and execute the JavaScript engine. It receives events from multiple sources, including navigation events, and routes them as necessary. When the content task needs to query information about layout it must send a request to the layout task.
  • Layout - Layout takes a snapshot of the DOM, calculates styles, and constructs the main layout data structure, the flow tree. The flow tree is used to calculate the layout of nodes and from there build a [display list], which is sent to the render task.
  • Renderer - The renderer receives a display list and renders visible portions to one or more tiles, possibly in parallel, and composites them to a surface for the application to display.
Clone this wiki locally
You can’t perform that action at this time.