0.3.0 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
Apache-2.0 - Apache License 2.0Servo is a prototype web browser engine written in the Rust language. It is currently developed on 64-bit macOS, 64-bit Linux, 64-bit Windows, and Android.
Servo welcomes contribution from everyone. See
CONTRIBUTING.md
and HACKING_QUICKSTART.md
for help getting started.
Visit the Servo Project page for news and guides.
If these instructions fail or you would like to install dependencies manually, try the manual build setup.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
pip3 install virtualenv
./mach bootstrap
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install python3-virtualenv python3-pip
sudo dnf install python3 python3-virtualenv python3-pip python3-devel
sudo pacman -S --needed python python-virtualenv python-pip
sudo emerge dev-python/virtualenv dev-python/pip
./mach bootstrap
rustup-init.exe
then follow the onscreen instructions.mach bootstrap
refreshenv
See also Windows Troubleshooting Tips.
Your CARGO_HOME needs to point to (or be in) the same drive as your Servo repository (See #28530).
git clone https://github.com/servo/servo
cd servo
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks. You can call Mach like this:
On Unix systems:
./mach [command] [arguments]
On Windows Commandline:
mach.bat [command] [arguments]
The examples below will use Unix, but the same applies to Windows.
Servo's build system uses rustup.rs to automatically download a Rust compiler.
This is a specific version of Rust Nightly determined by the
rust-toolchain
file.
To build Servo in development mode. This is useful for development, but the resulting binary is very slow:
./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
If you’re making changes to one crate that cause build errors in another crate, consider this instead of a full build:
./mach check
It will run cargo check
, which runs the analysis phase of the compiler
(and so shows build errors if any) but skips the code generation phase.
This can be a lot faster than a full build,
though of course it doesn’t produce a binary you can run.
For ARM (armv7-linux-androideabi
, most phones):
./mach build --release --android
./mach package --release --android
For x86 (typically for the emulator):
./mach build --release --target i686-linux-android
./mach package --release --target i686-linux-android
Run Servo with the command:
./servo [url] [arguments] # if you run with nightly build
./mach run [url] [arguments] # if you run with mach
# For example
./mach run https://www.google.com
-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-Z help
displays useful output to debug servoCtrl
+L
opens URL prompt (Cmd
+L
on Mac)Ctrl
+R
reloads current page (Cmd
+R
on Mac)Ctrl
+-
zooms out (Cmd
+-
on Mac)Ctrl
+=
zooms in (Cmd
+=
on Mac)Alt
+left arrow
goes backwards in the history (Cmd
+left arrow
on Mac)Alt
+right arrow
goes forwards in the history (Cmd
+right arrow
on Mac)Esc
or Ctrl
+Q
exits Servo (Cmd
+Q
on Mac)GStreamer
>=1.16gst-plugins-bad
>=1.16libXcursor
libXrandr
libXi
libxkbcommon
vulkan-loader
There are lots of mach commands you can use. You can list them with ./mach --help
.
The generated documentation can be found on https://doc.servo.org/servo/index.html