|
3 | 3 | {%- block title -%} Builds {%- endblock title -%}
|
4 | 4 |
|
5 | 5 | {%- block body -%}
|
6 |
| -{%- set docsrs_repo = "https://github.com/rust-lang/docs.rs" -%} |
7 |
| -<h1>Builds</h1> |
8 |
| -<div class="container about"> |
9 |
| -<p> |
10 |
| - Docs.rs automatically builds crates' documentation released on |
11 |
| - <a href="https://crates.io/">crates.io</a> |
12 |
| - using the nightly release of the Rust compiler. |
13 |
| - Builds can take a while depending how many crates are in <a href="/releases/queue">the queue</a>. |
14 |
| -</p> |
15 |
| - |
16 |
| -<p> |
17 |
| - {%- if rustc_version %} |
18 |
| - The current version of the Rust compiler in use is <code>{{ rustc_version }}</code>. |
19 |
| - {%- endif -%} |
20 |
| -</p> |
21 |
| - |
22 |
| -<p> |
23 |
| - The README of a crate is taken from the <code>readme</code> field defined in |
24 |
| - <code>Cargo.toml</code>. If a crate doesn't have this field, |
25 |
| - no README will be displayed. |
26 |
| -</p> |
27 |
| - |
28 |
| -<h3>Diagnosing a failed build</h3> |
29 |
| - |
30 |
| -<h4>Missing dependencies</h4> |
31 |
| -<p> |
32 |
| - Missing dependencies are a common reason for a failed build. |
33 |
| - Docs.rs dependencies are managed through |
34 |
| - <a href="https://github.com/rust-lang/crates-build-env">crates-build-env</a>; |
35 |
| - see <a href="https://forge.rust-lang.org/docs-rs/add-dependencies.html">Forge</a> for instructions |
36 |
| - on how to make a PR. You can always <a href="{{ docsrs_repo | safe }}/issues">file an issue</a> |
37 |
| - if you're having trouble. |
38 |
| -</p> |
39 |
| - |
40 |
| -<h4>Detecting Docs.rs from <code>build.rs</code></h4> |
41 |
| -<p> |
42 |
| - Docs.rs builds crates with the environment variable <code>DOCS_RS</code> set to |
43 |
| - <code>1</code>, which enables the crate to detect docs.rs and build the |
44 |
| - crate differently. This can be helpful if you need |
45 |
| - dependencies for building the library, but not for building the documentation. |
46 |
| -</p> |
47 |
| - |
48 |
| -<h4>Detecting Docs.rs from <code>#[cfg]</code> attributes</h4> |
49 |
| -<p> |
50 |
| - You can detect Docs.rs by having a <a href="https://doc.rust-lang.org/cargo/reference/features.html">feature</a> |
51 |
| - which is only set by Docs.rs. See <a href="metadata">Metadata</a> for more information. |
52 |
| -</p> |
53 |
| - |
54 |
| -<h4>Global sandbox limits</h4> |
55 |
| - |
56 |
| -<p> |
57 |
| - All the builds on docs.rs are executed inside a sandbox with limited |
58 |
| - resources. The current limits are the following: |
59 |
| -</p> |
60 |
| - |
61 |
| -{{ macros::crate_limits(limits=limits) }} |
62 |
| - |
63 |
| -<p> |
64 |
| - If a build fails because it hit one of those limits please |
65 |
| - <a href="{{ docsrs_repo | safe }}/issues/new/choose">open an issue</a> |
66 |
| - to get them increased for your crate. |
67 |
| - Note that network access will not be enabled for any crate. |
68 |
| -</p> |
69 |
| - |
70 |
| -<h4>Test crate documentation build locally</h4> |
71 |
| -{%- set build_subcommand = docsrs_repo ~ "/blob/master/README.md#build-subcommand" -%} |
72 |
| -<p> |
73 |
| - The <a href="{{ build_subcommand | safe }}">docs.rs README</a> describes how to build an |
74 |
| - unpublished crate's documentation locally using the same build environment as the build agent. |
75 |
| -</p> |
76 |
| -</div> |
77 |
| - |
| 6 | + {%- set docsrs_repo = "https://github.com/rust-lang/docs.rs" -%} |
| 7 | + <h1>Builds</h1> |
| 8 | + <div class="container about"> |
| 9 | + <p> |
| 10 | + Docs.rs automatically builds crates' documentation released on |
| 11 | + <a href="https://crates.io/">crates.io</a> |
| 12 | + using the nightly release of the Rust compiler. |
| 13 | + Builds can take a while depending how many crates are in <a href="/releases/queue">the queue</a>. |
| 14 | + </p> |
| 15 | + |
| 16 | + <p> |
| 17 | + {%- if rustc_version %} |
| 18 | + The current version of the Rust compiler in use is <code>{{ rustc_version }}</code>. |
| 19 | + {%- endif -%} |
| 20 | + </p> |
| 21 | + |
| 22 | + <p> |
| 23 | + The README of a crate is taken from the <code>readme</code> field defined in |
| 24 | + <code>Cargo.toml</code>. If a crate doesn't have this field, |
| 25 | + no README will be displayed. |
| 26 | + </p> |
| 27 | + |
| 28 | + <h3>Diagnosing a failed build</h3> |
| 29 | + |
| 30 | + <h4>Missing dependencies</h4> |
| 31 | + <p> |
| 32 | + Missing dependencies are a common reason for a failed build. |
| 33 | + Docs.rs dependencies are managed through |
| 34 | + <a href="https://github.com/rust-lang/crates-build-env">crates-build-env</a>; |
| 35 | + see <a href="https://forge.rust-lang.org/docs-rs/add-dependencies.html">Forge</a> for instructions |
| 36 | + on how to make a PR. You can always <a href="{{ docsrs_repo | safe }}/issues">file an issue</a> |
| 37 | + if you're having trouble. |
| 38 | + </p> |
| 39 | + |
| 40 | + <h4>Detecting Docs.rs from <code>build.rs</code></h4> |
| 41 | + <p> |
| 42 | + Docs.rs builds crates with the environment variable <code>DOCS_RS</code> set to |
| 43 | + <code>1</code>, which enables the crate to detect docs.rs and build the |
| 44 | + crate differently. This can be helpful if you need |
| 45 | + dependencies for building the library, but not for building the documentation. |
| 46 | + </p> |
| 47 | + |
| 48 | + <h4>Detecting Docs.rs from <code>#[cfg]</code> attributes</h4> |
| 49 | + <p> |
| 50 | + You can detect Docs.rs by having a <a href="https://doc.rust-lang.org/cargo/reference/features.html">feature</a> |
| 51 | + which is only set by Docs.rs. See <a href="metadata">Metadata</a> for more information. |
| 52 | + </p> |
| 53 | + |
| 54 | + <h4>Global sandbox limits</h4> |
| 55 | + |
| 56 | + <p> |
| 57 | + All the builds on docs.rs are executed inside a sandbox with limited |
| 58 | + resources. The current limits are the following: |
| 59 | + </p> |
| 60 | + |
| 61 | + {{ macros::crate_limits(limits=limits) }} |
| 62 | + |
| 63 | + <p> |
| 64 | + If a build fails because it hit one of those limits please |
| 65 | + <a href="{{ docsrs_repo | safe }}/issues/new/choose">open an issue</a> |
| 66 | + to get them increased for your crate. |
| 67 | + Note that network access will not be enabled for any crate. |
| 68 | + </p> |
| 69 | + |
| 70 | + <h4>Test crate documentation build locally</h4> |
| 71 | + {%- set build_subcommand = docsrs_repo ~ "/blob/master/README.md#build-subcommand" -%} |
| 72 | + <p> |
| 73 | + The <a href="{{ build_subcommand | safe }}">docs.rs README</a> describes how to build an |
| 74 | + unpublished crate's documentation locally using the same build environment as the build agent. |
| 75 | + </p> |
| 76 | + </div> |
78 | 77 | {%- endblock body %}
|
79 | 78 |
|
80 | 79 | {% block css -%}
|
|
0 commit comments