mirror of
https://github.com/servo/servo.git
synced 2025-06-08 08:33:26 +00:00
docs: add clone info, clarify/reorder
Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>
This commit is contained in:
parent
5025317e89
commit
1bdaeccdf6
1 changed files with 29 additions and 19 deletions
48
README.md
48
README.md
|
@ -261,38 +261,48 @@ linker = "lld-link.exe"
|
||||||
Run `./mach bootstrap-android --build` to get Android-specific tools. See wiki for
|
Run `./mach bootstrap-android --build` to get Android-specific tools. See wiki for
|
||||||
[details](https://github.com/servo/servo/wiki/Building-for-Android).
|
[details](https://github.com/servo/servo/wiki/Building-for-Android).
|
||||||
|
|
||||||
## The Rust compiler
|
### Cloning the Repo
|
||||||
|
Your CARGO_HOME needs to point to (or be in) the same drive as your Servo repository (See #28530).
|
||||||
|
``` sh
|
||||||
|
git clone https://github.com/servo/servo
|
||||||
|
cd servo
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Servo is built with [Cargo](https://crates.io/), 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 sytems:
|
||||||
|
```
|
||||||
|
./mach [command] [arguments]
|
||||||
|
```
|
||||||
|
On Windows Commandline:
|
||||||
|
```
|
||||||
|
mach.bat [command] [arguments]
|
||||||
|
```
|
||||||
|
The examples below will use Unix, but the same applies to Windows.
|
||||||
|
|
||||||
|
### The Rust compiler
|
||||||
|
|
||||||
Servo's build system uses rustup.rs to automatically download a Rust compiler.
|
Servo's build system uses rustup.rs to automatically download a Rust compiler.
|
||||||
This is a specific version of Rust Nightly determined by the
|
This is a specific version of Rust Nightly determined by the
|
||||||
[`rust-toolchain`](https://github.com/servo/servo/blob/master/rust-toolchain) file.
|
[`rust-toolchain`](https://github.com/servo/servo/blob/master/rust-toolchain) file.
|
||||||
|
|
||||||
## Building
|
|
||||||
|
|
||||||
Servo is built with [Cargo](https://crates.io/), the Rust package manager. We also use Mozilla's
|
|
||||||
Mach tools to orchestrate the build and other tasks.
|
|
||||||
|
|
||||||
### Normal build
|
### Normal build
|
||||||
|
|
||||||
To build Servo in development mode. This is useful for development, but
|
To build Servo in development mode.
|
||||||
the resulting binary is very slow.
|
This is useful for development, but the resulting binary is very slow:
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
git clone https://github.com/servo/servo
|
|
||||||
cd servo
|
|
||||||
./mach build --dev
|
./mach build --dev
|
||||||
./mach run tests/html/about-mozilla.html
|
./mach run tests/html/about-mozilla.html
|
||||||
```
|
```
|
||||||
|
|
||||||
Or on Windows MSVC, in a normal Command Prompt (cmd.exe):
|
### Release build
|
||||||
``` cmd
|
For benchmarking, performance testing, or real-world use.
|
||||||
git clone https://github.com/servo/servo
|
Add the `--release` flag to create an optimized build:
|
||||||
cd servo
|
|
||||||
mach.bat build --dev
|
|
||||||
```
|
|
||||||
|
|
||||||
For benchmarking, performance testing, or
|
|
||||||
real-world use, add the `--release` flag to create an optimized build:
|
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
./mach build --release
|
./mach build --release
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue