Skip to content

Commit 79e86e3

Browse files
committed
More build-manifest docs
1 parent d44e142 commit 79e86e3

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

src/tools/build-manifest/README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
# build-manifest
22

3-
This tool generates the manifests uploaded to static.rust-lang.org and used by
4-
rustup. The tool is invoked by the bootstrap tool.
3+
This tool generates the manifests uploaded to static.rust-lang.org and used by rustup.
4+
You can see a full list of all manifests at <https://static.rust-lang.org/manifests.txt>.
5+
6+
This gets called by `promote-release` <https://github.com/rust-lang/promote-release> via `x.py dist hash-and-sign`.
7+
8+
## Adding a new component
9+
10+
There are several steps involved here.
11+
1. Add a new `Step` to `dist.rs`. This should usually be named after the filename of the uploaded tarball. See https://github.com/rust-lang/rust/pull/101799/files#diff-2c56335faa24486df09ba392d8900c57e2fac4633e1f7038469bcf9ed3feb871 for an example.
12+
a. If appropriate, call `tarball.is_preview(true)` for the component.
13+
3. Add a new `PkgType` to build-manifest. Fix all the compile errors as appropriate.
514

615
## Testing changes locally
716

817
In order to test the changes locally you need to have a valid dist directory
918
available locally. If you don't want to build all the compiler, you can easily
1019
create one from the nightly artifacts with:
1120

12-
```
13-
#!/bin/bash
14-
for cmpn in rust rustc rust-std rust-docs cargo; do
15-
wget https://static.rust-lang.org/dist/${cmpn}-nightly-x86_64-unknown-linux-gnu.tar.gz
21+
```sh
22+
for component in rust rustc rust-std rust-docs cargo; do
23+
wget -P build/dist https://static.rust-lang.org/dist/${component}-nightly-x86_64-unknown-linux-gnu.tar.gz
1624
done
1725
```
1826

19-
Then, you can generate the manifest and all the packages from `path/to/dist` to
20-
`path/to/output` with:
27+
Then, you can generate the manifest and all the packages from `build/dist` to
28+
`build/manifest` with:
2129

30+
```sh
31+
mkdir -p build/manifest
32+
cargo +nightly run -p build-manifest build/dist build/manifest 1970-01-01 http://example.com nightly
2233
```
23-
$ cargo +nightly run path/to/dist path/to/output 1970-01-01 http://example.com CHANNEL
24-
```
25-
26-
Remember to replace `CHANNEL` with the channel you produced dist artifacts of
27-
and `VERSION` with the current Rust version.

src/tools/build-manifest/src/main.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
//! Build a dist manifest, hash and sign everything.
2-
//! This gets called by `promote-release`
3-
//! (https://github.com/rust-lang/rust-central-station/tree/master/promote-release)
4-
//! via `x.py dist hash-and-sign`; the cmdline arguments are set up
5-
//! by rustbuild (in `src/bootstrap/dist.rs`).
1+
#![doc = include_str!("../README.md")]
62

73
mod checksum;
84
mod manifest;

0 commit comments

Comments
 (0)