The Servo Browser Engine
Find a file
Ralph Giles 135bcacee4 Use the correct .png extension for the image placeholder.
This was changed to the mozilla broken image resource
without changing the filename, even though the file
type changed.
2015-11-13 11:45:09 -08:00
components Use the correct .png extension for the image placeholder. 2015-11-13 11:45:09 -08:00
etc Add script to check if lockfile was changed 2015-11-06 00:42:33 +05:30
ports Update string_cache_shared. 2015-11-13 17:52:03 +01:00
python Ignore sync directories in test-tidy. 2015-11-10 10:29:26 +01:00
resources Use the correct .png extension for the image placeholder. 2015-11-13 11:45:09 -08:00
support Disable zipalign until we have stable builder automation to install and locate it 2015-11-10 18:30:26 -06:00
tests Use the correct .png extension for the image placeholder. 2015-11-13 11:45:09 -08:00
.gitattributes Appease Github's Linguist 2015-06-11 00:16:42 -04:00
.gitignore Revert "Revert "Auto merge of #7103 - frewsxcv:python-venv, r=metajack" for breaking web-platform-tests." 2015-09-02 09:34:01 -04:00
.travis.yml Auto merge of #8366 - larsbergstrom:ccache, r=frewsxcv 2015-11-07 07:01:54 +05:30
cargo-nightly-build Run all unit tests with just one Cargo command. 2015-10-01 17:59:18 +02:00
CONTRIBUTING.md Add servo-starters to CONTRIBUTING 2015-11-07 13:11:42 -07:00
HACKING_QUICKSTART.md Typo fix 2015-11-06 15:52:58 +02:00
Info.plist Build an app bundle on OS X 2012-04-23 17:43:45 -07:00
LICENSE Add license 2013-04-03 18:37:29 -07:00
mach Minor style tweak 2015-09-14 20:55:23 +01:00
ORGANIZATION.md Add more information to ORGANIZATION.md 2015-10-16 15:02:50 -04:00
README.md hacking quickstart 2015-10-23 14:37:18 +02:00
rust-snapshot-hash Rust upgrade to nightly 20151002 2015-10-02 13:50:11 -05:00
servobuild.example Add CCACHE infra and turn it on in travis 2015-11-05 14:47:23 -06:00

The Servo Parallel Browser Project

Servo is a prototype web browser engine written in the Rust language. It is currently developed on 64bit OS X, 64bit Linux, Android, and Gonk (Firefox OS).

Servo welcomes contribution from everyone. See CONTRIBUTING.md and HACKING_QUICKSTART.md for help getting started.

Prerequisites

On OS X (homebrew):

brew install automake pkg-config python cmake
pip install virtualenv

On OS X (MacPorts):

sudo port install python27 py27-virtualenv cmake

On Debian-based Linuxes:

sudo apt-get install curl freeglut3-dev \
    libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
    gperf g++ cmake python-virtualenv python-pip \
    libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev libglu1-mesa-dev

If you are on Ubuntu 14.04 and encountered errors on installing these dependencies involving libcheese, see #6158 for a workaround.

On Fedora:

sudo dnf install curl freeglut-devel libtool gcc-c++ libXi-devel \
    freetype-devel mesa-libGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
    fontconfig-devel cabextract ttmkfdir python python-virtualenv python-pip expat-devel \
    rpm-build openssl-devel cmake bzip2-devel libXcursor-devel libXmu-devel mesa-libOSMesa-devel

On Arch Linux:

sudo pacman -S --needed base-devel git python2 python2-virtualenv python2-pip mesa cmake bzip2 libxmu

On Gentoo Linux:

sudo emerge net-misc/curl media-libs/freeglut \
    media-libs/freetype media-libs/mesa dev-util/gperf \
    dev-python/virtualenv dev-python/pip dev-libs/openssl \
    x11-libs/libXmu media-libs/glu x11-base/xorg-server

Cross-compilation for Android:

Pre-installed Android tools are needed. See wiki for details

Using Virtualbox:

If you're running servo on a guest machine, make sure 3D Acceleration is switched off (#5643)

The Rust compiler

Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two. If you'd like to know the snapshot revision of Rust which we use, see rust-snapshot-hash.

Building

Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.

Normal build

To build Servo in development mode. This is useful for development, but the resulting binary is very slow.

git clone https://github.com/servo/servo
cd servo
./mach build --dev
./mach run tests/html/about-mozilla.html

For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:

./mach build --release
./mach run --release tests/html/about-mozilla.html

Building for Android target

git clone https://github.com/servo/servo
cd servo
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android
cd ports/android
ANDROID_SDK=/path/to/sdk make install

Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:

cp servobuild.example .servobuild
# edit .servobuild

Running

Use ./mach run [url] to run Servo.

Commandline Arguments

  • -p INTERVAL turns on the profiler and dumps info to the console every INTERVAL seconds
  • -s SIZE sets the tile size for painting; defaults to 512
  • -z disables all graphical output; useful for running JS / layout tests

Keyboard Shortcuts

  • Ctrl-- zooms out
  • Ctrl-= zooms in
  • Backspace goes backwards in the history
  • Shift-Backspace goes forwards in the history
  • Esc exits servo

Developing

There are lots of mach commands you can use. You can list them with ./mach --help.

The generated documentation can be found on http://doc.servo.org/servo/index.html