gecko-dev/servo
Tamir Duberstein d81e0107b7 servo: Merge #7752 - mach: fix OS X notifications (from tamird:fix-osx-notifications); r=nox
Since mach now puts everything into a virtualenv, we need to set the bundle identifier to allow sending notifications.

Source-Repo: https://github.com/servo/servo
Source-Revision: a1fb8cfbb0be8d0a73bc1e3b63eb704f48098b8f
2015-09-27 07:35:50 -06:00
..
components servo: Merge #7754 - changing test_union.html to union.html fixes #7744 (from Jayflux:#7744); r=nox 2015-09-27 06:25:42 -06:00
etc servo: Merge #7249 - Only use a rustc wrapper script when ld.gold is available (from servo:gold); r=paulrouget 2015-08-17 01:26:26 -06:00
ports servo: Merge #7742 - Update unicode-bidi to 0.2.2 (from mbrubeck:update-bidi); r=Manishearth 2015-09-25 14:23:50 -06:00
python servo: Merge #7752 - mach: fix OS X notifications (from tamird:fix-osx-notifications); r=nox 2015-09-27 07:35:50 -06:00
resources servo: Merge #7651 - Implement resettable and String-valued prefs (from jgraham:prefs_reset); r=Ms2ger 2015-09-25 08:18:06 -06:00
support servo: Merge #6591 - Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) (from servo:rustup_2015-07-10); r=larsbergstrom 2015-07-14 13:40:22 -06:00
tests servo: Merge #7497 - tests for devtools integration with network requests/responses (from psdh:devtest7473); r=jdm 2015-09-25 11:35:57 -06:00
.gitattributes servo: Merge #6336 - Appease Github's Linguist (from nerith:master); r=Manishearth 2015-06-10 22:30:58 -06:00
.gitignore servo: Merge #7117 - Reenable "Use one Python virtual environment for all mach commands" (from frewsxcv:python-venv); r=jdm 2015-09-02 08:44:27 -06:00
.travis.yml servo: Merge #5213 - Check tidy in Travis file (from servo:tidy-travis); r=Ms2ger 2015-03-14 06:54:48 -06:00
cargo-nightly-build servo: Merge #7049 - Upgrade cargo to 0.5.0-nightly (657e363 2015-08-19) (from servo:cargoup); r=SimonSapin 2015-08-20 08:46:04 -06:00
CONTRIBUTING.md servo: Link to instructions that don't mention critic. 2015-09-18 11:48:21 -04:00
Info.plist servo: Build an app bundle on OS X 2012-04-23 17:43:45 -07:00
LICENSE servo: Add license 2013-04-03 18:37:29 -07:00
mach servo: Merge #7632 - Speedup mach startup (from aidanhs:aphs-speedup-mach-startup); r=metajack 2015-09-16 14:34:17 -06:00
ORGANIZATION.md servo: Merge #7581 - Add energy monitoring and characterization scripts (from connorimes:power-profiling); r=larsbergstrom 2015-09-09 15:24:48 -06:00
README.md servo: Merge #7655 - Remove shortcut that doesn't exist (from servo:jdm-patch-1); r=glennw 2015-09-16 22:16:08 -06:00
rust-snapshot-hash servo: Merge #7697 - Rust upgrade to rustc 1.5.0-dev (6217b002b 2015-09-21) (from servo:rustup_20150921); r=Ms2ger 2015-09-23 06:45:18 -06:00
servobuild.example servo: Merge #7565 - Make the use of gold linker configurable (from akosthekiss:config-gold); r=SimonSapin 2015-09-08 13:57:13 -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 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

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