Skip to content

Commit 288f66d

Browse files
committed
add section about cargo docs-rs to our build-info page
1 parent 868273b commit 288f66d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

templates/core/about/builds.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ <h4 id="cross-compiling"> <a href="#cross-compiling">Cross-compiling</a> </h4>
6363
This approach is also useful for setting <a href="https://doc.rust-lang.org/cargo/reference/features.html">cargo features</a>.
6464
</p>
6565

66+
<h4 id="testing-builds-ci"> <a href="#testing-builds-ci">Testing documentation builds in CI</a> </h4>
67+
<p>
68+
When you start using docs.rs metadata or <code>#[cfg(docsrs)]</code> in your code, you might run into issues
69+
where your code builds fine locally but fails on docs.rs.
70+
71+
To avoid this, you can add <a href="https://github.com/dtolnay/cargo-docs-rs"><code>cargo docs-rs</code></a> to
72+
your test-suite.
73+
74+
While it doesn't perfectly replicate our build environment, it can catch many common issues.
75+
</p>
76+
6677
<h4 id="testing-builds-locally"> <a href="#testing-builds-locally">Testing documentation builds locally</a> </h4>
6778
{%- set build_subcommand = "{}/blob/master/README.md#build-subcommand"|format(docsrs_repo) -%}
6879
<p>

0 commit comments

Comments
 (0)