Skip to content

Commit 6ff3fb9

Browse files
committed
last fixes to the post
1 parent eedcf8d commit 6ff3fb9

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

posts/2019-09-18-upcoming-docsrs-changes.md

+22-10
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ author: The Rust Infrastructure Team
66

77
On September 30th breaking changes will be deployed to the [docs.rs] build
88
environment. [docs.rs] is a free service building and hosting documentation for
9-
all the crates published on [crates.io]. It's [open source][docsrs-source] and
10-
maintained by the [Rustdoc team][rustdoc-team].
9+
all the crates published on [crates.io]. It's [open source][docsrs-source],
10+
maintained by the [Rustdoc team][rustdoc-team] and operated by the
11+
[Infrastructure team][infra-team].
1112

1213
## What will change
1314

@@ -17,7 +18,7 @@ build as many crates as possible. It's already used by [Crater], and we added
1718
all the dependencies previously installed in the legacy build environment.
1819

1920
To ensure we can continue operating the service in the future and to increase
20-
its reliability we also improved the sandbox builds are executed in, adding
21+
its reliability we also improved the sandbox the builds are executed in, adding
2122
new limits:
2223

2324
* Each platform will now have **15 minutes** to build its dependencies and
@@ -38,26 +39,34 @@ Docker image locally and execute a shell inside it:
3839

3940
```
4041
docker pull rustops/crates-build-env
41-
docker run --rm -it rustops/crates-build-env bash
42+
docker run --rm --memory 3221225472 -it rustops/crates-build-env bash
4243
```
4344

44-
Once you're in a shell you can install [rustup] (it's not installed in the
45-
image), install Rust nightly, clone your crate's repository and then build the
46-
documentation:
45+
Once you're in a shell you can install [rustup] (it's not installed by default
46+
in the image), install Rust nightly, clone your crate's repository and then
47+
build the documentation:
4748

4849
```
49-
cargo doc --no-deps
50+
time cargo doc --no-deps
5051
```
5152

52-
If a dependency is missing, please [open an issue][crates-build-env-issue] on
53-
the Docker image's [repository][rustops/crates-build-env].
53+
To aid your testing these commands will limit the available RAM to 3 GB and
54+
show the total execution time of `cargo doc`, but network access will not be
55+
blocked as you'll need to fetch dependencies.
56+
57+
If your project needs a system dependency missing in the build environment,
58+
please [open an issue][crates-build-env-issue] on the Docker image's
59+
[repository][rustops/crates-build-env] and we'll consider adding it.
5460

5561
If your crate fails to build because it took more than 15 minutes to generate
5662
its docs or it uses more than 3 GB of RAM please [open an issue][docsrs-issue]
5763
and we will consider reasonable limit increases for your crate. We will **not**
5864
enable network access for your crate though: you'll need to change your crate
5965
not to require any external resource at build time.
6066

67+
We recommend using [Cargo features] to remove the parts of the code causing
68+
build failures, enabling those features with [docs.rs metadata].
69+
6170
## Acknowledgements
6271

6372
The new build environment is based on [Rustwide], the library powering
@@ -72,11 +81,14 @@ Rousskov][mark] reviewing the changes.
7281
[crates.io]: https://crates.io
7382
[docsrs-source]: https://github.com/rust-lang/docs.rs
7483
[rustdoc-team]: https://www.rust-lang.org/governance/teams/dev-tools#rustdoc
84+
[infra-team]: https://www.rust-lang.org/governance/teams/operations#infra
7585
[rustops/crates-build-env]: https://hub.docker.com/r/rustops/crates-build-env
7686
[Crater]: https://github.com/rust-lang/crater
7787
[rustup]: https://rustup.rs
7888
[crates-build-env-issue]: https://github.com/rust-lang/crates-build-env/issues
7989
[docsrs-issue]: https://github.com/rust-lang/crates-build-env/issues
90+
[Cargo features]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section
91+
[docs.rs metadata]: https://docs.rs/about
8092
[rustwide]: https://github.com/rust-lang/rustwide
8193
[Crater contributors]: https://github.com/rust-lang/crater/graphs/contributors
8294
[Rustwide contributors]: https://github.com/rust-lang/rustwide/graphs/contributors

0 commit comments

Comments
 (0)