File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments