Skip to content

Commit 22b08c4

Browse files
committed
Auto merge of #7565 - ehuss:expand-build-script-docs, r=alexcrichton
Expand documentation on build scripts. This restructures and adds some more documentation for writing build scripts. An overview: - Move examples to a separate chapter. - Add some links to common build dependencies. - Rewrote the example of linking to system libraries. - Rewrote some of the `links` and `-sys` examples. - Added a "conditional compilation" example. - De-emphasize setting `build = "build.rs"`. - Explain how build scripts run. - Give each `cargo:` instruction a separate section with more detail. - More detail on how `rerun-if` stuff works. Also, try to emphasize best practices, especially in examples. - Try to clarify `links` and go into more detail. - Document the jobserver. - Expand on environment variables. - Document dylib search path behavior. I have explicitly skipped trying to document rpath issues, as it seems to be a mess, and I can't really sort it out. I'd be happy to have any feedback for things to add or change. Closes #1251 Closes #2236 Closes #2888 Closes #3304 Closes #3968 Closes #5499 Closes #7338
2 parents 5b20444 + dd546ea commit 22b08c4

File tree

6 files changed

+856
-483
lines changed

6 files changed

+856
-483
lines changed

src/doc/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* [Configuration](reference/config.md)
2525
* [Environment Variables](reference/environment-variables.md)
2626
* [Build Scripts](reference/build-scripts.md)
27+
* [Build Script Examples](reference/build-script-examples.md)
2728
* [Publishing on crates.io](reference/publishing.md)
2829
* [Package ID Specifications](reference/pkgid-spec.md)
2930
* [Source Replacement](reference/source-replacement.md)

0 commit comments

Comments
 (0)