2013-05-30 20:36:45 +04:00
|
|
|
The Servo Parallel Browser Project
|
2012-02-08 23:29:12 +04:00
|
|
|
|
2013-02-14 23:08:57 +04:00
|
|
|
Servo is a prototype web browser engine written in the [Rust](https://github.com/mozilla/rust)
|
2013-03-26 22:26:24 +04:00
|
|
|
language. It is currently developed on 64bit OS X and 64bit Linux.
|
2012-08-18 06:41:22 +04:00
|
|
|
|
2013-10-14 19:28:11 +04:00
|
|
|
Servo welcomes contribution from everyone. See
|
|
|
|
[`CONTRIBUTING.md`](CONTRIBUTING.md) for help getting started.
|
|
|
|
|
2012-10-18 10:24:02 +04:00
|
|
|
## Prerequisites
|
|
|
|
|
2012-08-22 22:50:10 +04:00
|
|
|
On OS X (homebrew):
|
2012-05-11 02:20:26 +04:00
|
|
|
|
2013-04-04 20:49:08 +04:00
|
|
|
``` sh
|
|
|
|
brew install https://raw.github.com/Homebrew/homebrew-versions/master/autoconf213.rb
|
2014-08-05 17:31:21 +04:00
|
|
|
brew install automake libtool pkg-config python
|
|
|
|
pip install virtualenv
|
2013-04-04 20:49:08 +04:00
|
|
|
```
|
2012-05-11 02:20:26 +04:00
|
|
|
|
2012-08-22 22:50:10 +04:00
|
|
|
On OS X (MacPorts):
|
|
|
|
|
2013-04-04 20:49:08 +04:00
|
|
|
``` sh
|
2014-08-05 17:31:21 +04:00
|
|
|
sudo port install autoconf213 python27 py27-virtualenv
|
2013-04-04 20:49:08 +04:00
|
|
|
```
|
2014-08-05 17:31:21 +04:00
|
|
|
|
2012-05-11 02:20:26 +04:00
|
|
|
On Debian-based Linuxes:
|
|
|
|
|
2013-04-04 20:49:08 +04:00
|
|
|
``` sh
|
2013-07-10 21:12:46 +04:00
|
|
|
sudo apt-get install autoconf2.13 curl freeglut3-dev libtool \
|
2014-03-01 04:40:38 +04:00
|
|
|
libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
|
2014-08-05 17:31:21 +04:00
|
|
|
msttcorefonts gperf g++ automake cmake python-virtualenv
|
2013-04-04 20:49:08 +04:00
|
|
|
```
|
2012-05-11 02:20:26 +04:00
|
|
|
|
2014-07-07 23:09:01 +04:00
|
|
|
On Fedora:
|
2014-04-17 05:31:08 +04:00
|
|
|
|
|
|
|
``` sh
|
2014-08-11 03:28:50 +04:00
|
|
|
sudo yum install autoconf213 curl freeglut-devel libtool gcc-c++ libXi-devel \
|
2014-08-27 00:12:42 +04:00
|
|
|
freetype-devel mesa-libGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
|
2014-08-11 03:28:50 +04:00
|
|
|
fontconfig-devel cabextract ttmkfdir python python-virtualenv expat-devel rpm-build
|
2014-04-17 05:31:08 +04:00
|
|
|
pushd .
|
|
|
|
cd /tmp
|
|
|
|
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
|
|
|
|
rpmbuild -bb msttcorefonts-2.5-1.spec
|
2014-08-05 17:31:21 +04:00
|
|
|
sudo yum install $HOME/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm
|
2014-04-17 05:31:08 +04:00
|
|
|
popd
|
|
|
|
```
|
|
|
|
|
2014-05-09 06:55:10 +04:00
|
|
|
Cross-compilation for Android:
|
2013-08-28 06:21:34 +04:00
|
|
|
|
2014-05-09 06:55:10 +04:00
|
|
|
Basically, pre-installed Android tools are needed.
|
2014-02-26 01:01:38 +04:00
|
|
|
See wiki for [details](https://github.com/mozilla/servo/wiki/Building-for-Android)
|
2013-08-28 06:21:34 +04:00
|
|
|
|
2014-08-23 00:34:52 +04:00
|
|
|
## The Rust compiler
|
|
|
|
|
2013-01-10 06:52:17 +04:00
|
|
|
Servo builds its own copy of Rust, so there is no need to provide a Rust
|
|
|
|
compiler.
|
2014-08-23 00:34:52 +04:00
|
|
|
If you'd like to know the snapshot revision of Rust which we use, see `./rust-snapshot-hash`.
|
2013-01-10 06:52:17 +04:00
|
|
|
|
2012-10-18 10:24:02 +04:00
|
|
|
## Building
|
2012-05-06 03:51:26 +04:00
|
|
|
|
2013-07-10 21:12:46 +04:00
|
|
|
Servo cannot be built in-tree; you must create a directory in which to run
|
|
|
|
configure and make and place the build artifacts.
|
|
|
|
|
2013-04-04 20:49:08 +04:00
|
|
|
``` sh
|
2013-07-19 20:39:32 +04:00
|
|
|
git clone https://github.com/mozilla/servo.git
|
2013-04-04 20:49:08 +04:00
|
|
|
cd servo
|
|
|
|
mkdir -p build && cd build
|
|
|
|
../configure
|
|
|
|
make && make check
|
2013-05-30 06:30:47 +04:00
|
|
|
./servo ../src/test/html/about-mozilla.html
|
2013-04-04 20:49:08 +04:00
|
|
|
```
|
2013-03-13 19:36:44 +04:00
|
|
|
|
2013-08-28 06:21:34 +04:00
|
|
|
###Building for Android target
|
|
|
|
|
|
|
|
``` sh
|
|
|
|
git clone https://github.com/mozilla/servo.git
|
|
|
|
cd servo
|
|
|
|
mkdir -p build && cd build
|
2014-05-09 06:55:10 +04:00
|
|
|
../configure --target=arm-linux-androideabi --android-cross-path=<Android toolchain path> --android-ndk-path=<Android NDK path> --android-sdk-path=<Android SDK path>
|
2013-08-28 06:21:34 +04:00
|
|
|
make
|
2014-05-09 06:55:10 +04:00
|
|
|
(or make package)
|
|
|
|
|
2013-08-28 06:21:34 +04:00
|
|
|
```
|
|
|
|
|
2013-07-10 21:12:46 +04:00
|
|
|
## Running
|
|
|
|
|
|
|
|
### Commandline Arguments
|
|
|
|
|
|
|
|
- `-p INTERVAL` turns on the profiler and dumps info to the console every
|
|
|
|
`INTERVAL` seconds
|
|
|
|
- `-s SIZE` sets the tile size for rendering; defaults to 512
|
2013-10-23 00:52:14 +04:00
|
|
|
- `-z` disables all graphical output; useful for running JS / layout tests
|
2013-07-10 21:12:46 +04:00
|
|
|
|
|
|
|
### Keyboard Shortcuts
|
|
|
|
|
|
|
|
- `Ctrl-L` opens a dialog to browse to a new URL (Mac only currently)
|
|
|
|
- `Ctrl--` zooms out
|
|
|
|
- `Ctrl-=` zooms in
|
|
|
|
- `Backspace` goes backwards in the history
|
|
|
|
- `Shift-Backspace` goes forwards in the history
|
2013-07-17 02:01:15 +04:00
|
|
|
- `Esc` exits servo
|
2013-07-10 21:12:46 +04:00
|
|
|
|
|
|
|
## Developing
|
|
|
|
|
|
|
|
There are lots of make targets you can use:
|
|
|
|
|
|
|
|
- `make clean` - cleans Servo and its dependencies, but not Rust
|
|
|
|
- `make clean-rust` - cleans Rust
|
2014-05-09 06:55:10 +04:00
|
|
|
- `make clean-servo` - only cleans Servo itself (code in `src/components`)
|
2013-07-10 21:12:46 +04:00
|
|
|
- `make clean-DEP` - cleans the dependency `DEP`. e.g. `make clean-rust-opengles`
|
|
|
|
- `make bindings` - generate the Rust WebIDL bindings
|
|
|
|
- `make DEP` - builds only the specified dependency. e.g. `make rust-opengles`
|
|
|
|
- `make check-DEP` - build and run tests for specified dependency
|
2014-05-09 06:55:10 +04:00
|
|
|
- `make package` - build and make app package for specific OS. e.g. apk file of Android
|
2013-07-10 21:12:46 +04:00
|
|
|
|
2014-03-05 02:22:44 +04:00
|
|
|
The `make check-*` targets for running tests are listed [here](https://github.com/mozilla/servo/wiki/Testing)
|