mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #12266 - tshepang:patch-1, r=nox
Update HACKING_QUICKSTART.md Some grammar fixes --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they are documentation changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12266) <!-- Reviewable:end -->
This commit is contained in:
commit
9b2b101d19
1 changed files with 11 additions and 11 deletions
|
@ -1,21 +1,21 @@
|
||||||
# Hacking Servo - Quickstart
|
# Hacking Servo - Quickstart
|
||||||
|
|
||||||
This guide covers the basics things one needs to know to start hacking Servo.
|
This guide covers the basic things one needs to know to start hacking Servo.
|
||||||
It doesn't cover how Servo works (see the [documentation](#documentation) section for that),
|
It doesn't cover how Servo works (see the [documentation](#documentation) section for that),
|
||||||
but describe how to setup your environment to compile, run, and debug Servo. For information
|
but describes how to setup your environment to compile, run, and debug Servo. For information
|
||||||
on the [Github Workflow](https://github.com/servo/servo/wiki/Github-workflow) and some helpful
|
on the [Github Workflow](https://github.com/servo/servo/wiki/Github-workflow) and some helpful
|
||||||
[Git Tips](https://github.com/servo/servo/wiki/Github-workflow#git-tips) see the
|
[Git Tips](https://github.com/servo/servo/wiki/Github-workflow#git-tips), see the
|
||||||
[Wiki](https://github.com/servo/servo/wiki).
|
[Wiki](https://github.com/servo/servo/wiki).
|
||||||
|
|
||||||
## Building Servo
|
## Building Servo
|
||||||
|
|
||||||
Building Servo is quite easy. Install the prerequisites described in the [README](../README.md) file. Then type:
|
Building Servo is quite easy. Install the prerequisites described in the [README](../README.md) file, then type:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./mach build -d
|
./mach build -d
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note: on Mac, you might run into a SSL issue while compiling. You'll find a solution to this problem [here](https://github.com/sfackler/rust-openssl/issues/255).*
|
*Note: on Mac, you might run into an SSL issue while compiling. You'll find a solution to this problem [here](https://github.com/sfackler/rust-openssl/issues/255).*
|
||||||
|
|
||||||
The `-d` option means "debug build". You can also build with the `-r` option which means "release build". Building with `-d` will allow you to use a debugger (lldb). A `-r` build is more performant. Release builds are slower to build.
|
The `-d` option means "debug build". You can also build with the `-r` option which means "release build". Building with `-d` will allow you to use a debugger (lldb). A `-r` build is more performant. Release builds are slower to build.
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ You can use and build a release build and a debug build in parallel.
|
||||||
|
|
||||||
## Running Servo
|
## Running Servo
|
||||||
|
|
||||||
The servo binary is located in `target/debug/servo` (or `target/release/servo`). You can directly run this binary. But we recommend using `./mach` instead:
|
The servo binary is located in `target/debug/servo` (or `target/release/servo`). You can directly run this binary, but we recommend using `./mach` instead:
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
./mach run -d -- http://github.com
|
./mach run -d -- http://github.com
|
||||||
|
@ -45,7 +45,7 @@ If you build with `-d`, run with `-d`. If you build with `-r`, run with `-r`.
|
||||||
./mach run -d [mach options] -- [servo options]
|
./mach run -d [mach options] -- [servo options]
|
||||||
```
|
```
|
||||||
|
|
||||||
The `--` separates `mach` options from `servo` options. This is not required, but we recommend it. `mach` and `servo` have some options with the same name (`--help`, `--debug`), the `--` makes it clear where options apply.
|
The `--` separates `mach` options from `servo` options. This is not required, but we recommend it. `mach` and `servo` have some options with the same name (`--help`, `--debug`), so the `--` makes it clear where options apply.
|
||||||
|
|
||||||
## Mach and Servo options
|
## Mach and Servo options
|
||||||
|
|
||||||
|
@ -68,14 +68,14 @@ Even if you have never seen any Rust code, it's not too hard to read Servo's cod
|
||||||
|
|
||||||
This won't be enough to do any serious work at first, but if you want to navigate the code and fix basic bugs, that should do it. It's a good starting point, and as you dig into Servo source code, you'll learn more.
|
This won't be enough to do any serious work at first, but if you want to navigate the code and fix basic bugs, that should do it. It's a good starting point, and as you dig into Servo source code, you'll learn more.
|
||||||
|
|
||||||
For a more exhaustive documentation:
|
For more exhaustive documentation:
|
||||||
|
|
||||||
- [doc.rust-lang.org](https://doc.rust-lang.org)
|
- [doc.rust-lang.org](https://doc.rust-lang.org)
|
||||||
- [rust by example](http://rustbyexample.com)
|
- [rust by example](http://rustbyexample.com)
|
||||||
|
|
||||||
## Cargo and Crates
|
## Cargo and Crates
|
||||||
|
|
||||||
A Rust library is called a crate. Servo uses plenty of crates. These crates are dependencies. They are listed in files called `Cargo.toml`. Servo is split in components and ports (see `components` and `ports` directories). Each has its own dependencies, each has its own `Cargo.toml` file.
|
A Rust library is called a crate. Servo uses plenty of crates. These crates are dependencies. They are listed in files called `Cargo.toml`. Servo is split in components and ports (see `components` and `ports` directories). Each has its own dependencies, and each has its own `Cargo.toml` file.
|
||||||
|
|
||||||
`Cargo.toml` files list the dependencies. You can edit this file.
|
`Cargo.toml` files list the dependencies. You can edit this file.
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ From here, use:
|
||||||
(lldb) print varname
|
(lldb) print varname
|
||||||
```
|
```
|
||||||
|
|
||||||
And to search for a function full name/regex:
|
And to search for a function's full name/regex:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
(lldb) image lookup -r -n <name> #lldb
|
(lldb) image lookup -r -n <name> #lldb
|
||||||
|
@ -241,7 +241,7 @@ To run a test:
|
||||||
|
|
||||||
### Updating a test:
|
### Updating a test:
|
||||||
|
|
||||||
In some cases extensive tests for the feature you're working on may already exist under tests/wpt:
|
In some cases, extensive tests for the feature you're working on already exist under tests/wpt:
|
||||||
|
|
||||||
- Make a release build
|
- Make a release build
|
||||||
- run `./mach test-wpt --release --log-raw=/path/to/some/logfile`
|
- run `./mach test-wpt --release --log-raw=/path/to/some/logfile`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue