11# Build Scripts
22
3- Sometimes a normal build from cargo is not enough. Perhaps your crate needs some
4- pre-requisites before cargo will successfully compile, things like code
3+ Sometimes a normal build from ` cargo ` is not enough. Perhaps your crate needs
4+ some pre-requisites before ` cargo ` will successfully compile, things like code
55generation, or some native code that needs to be compiled. To solve this problem
66we have build scripts that Cargo can run.
77
@@ -20,7 +20,7 @@ default.
2020## How to use a build script
2121
2222The build script is simply another Rust file that will be compiled and invoked
23- prior to compiling anything else in the package. Hence it can be used to fulfil
23+ prior to compiling anything else in the package. Hence it can be used to fulfill
2424pre-requisites of your crate.
2525
2626Cargo provides the script with inputs via environment variables [ specified
@@ -29,10 +29,11 @@ here] that can be used.
2929The script provides output via stdout. All lines printed are written to
3030` target/debug/build/<pkg>/output ` . Further, lines prefixed with ` cargo: ` will be
3131interpreted by Cargo directly and hence can be used to define parameters for the
32- packages compilation.
32+ package's compilation.
3333
34- For further specification and examples have a read of the [ cargo specification] .
34+ For further specification and examples have a read of the
35+ [ Cargo specification] [ cargo_specification ] .
3536
3637[ specified here ] : https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
3738
38- [ cargo specification ] : https://doc.rust-lang.org/cargo/reference/build-scripts.html
39+ [ cargo_specification ] : https://doc.rust-lang.org/cargo/reference/build-scripts.html
0 commit comments