Skip to content

Commit 4a9776e

Browse files
authored
Update website build instructions
1 parent 31b043d commit 4a9776e

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

site/README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,28 @@ which displays graphs to the user.
77
This also contains a GitHub bot to trigger on-demand benchmarking.
88

99
## Setup
10-
11-
The site launches on port 2346 by default, which can be overridden by setting
12-
the `PORT` environment variable.
13-
14-
```
15-
git clone https://github.com/rust-lang/rustc-perf.git
16-
```
10+
You can build the website in multiple ways:
11+
- Download a precompiled [nightly build](https://github.com/rust-lang/rustc-perf/releases).
12+
- Use the provided Docker image:
13+
```console
14+
$ git clone https://github.com/rust-lang/rustc-perf.git
15+
$ docker build -t rustc-perf .
16+
```
17+
- Build it yourself:
18+
```console
19+
$ git clone https://github.com/rust-lang/rustc-perf.git
20+
21+
# Build frontend
22+
$ cd site/frontend
23+
$ npm run build
24+
25+
# Build website binary
26+
$ cd ../..
27+
$ cargo build --bin site --release
28+
```
29+
The `--release` flag is on purpose, reducing startup time 15x from roughly 15
30+
seconds to 1; this is on the production database and smaller data sets are
31+
likely to load considerably faster.
1732

1833
## Launching
1934

@@ -22,10 +37,9 @@ local database. By default, a database called results.db located at the root of
2237
the project will be used. You can optionally pass a path to a database
2338
if you don't want to use the default.
2439

25-
```
26-
cargo run --bin site --release <database>
27-
```
40+
The site launches on port 2346 by default, which can be overridden by setting
41+
the `PORT` environment variable.
2842

29-
The `--release` flag is on purpose, reducing startup time 15x from roughly 15
30-
seconds to 1; this is on the production database and smaller data sets are
31-
likely to load considerably faster.
43+
```console
44+
$ ./target/release/site <database>
45+
```

0 commit comments

Comments
 (0)