Skip to content

Commit bb1ecf1

Browse files
authored
Merge pull request #1288 from stomar/cargo-build-scripts
Improve Cargo / Build Scripts section
2 parents 4804c5a + 3af0217 commit bb1ecf1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/cargo/build_scripts.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
55
generation, or some native code that needs to be compiled. To solve this problem
66
we have build scripts that Cargo can run.
77

@@ -20,7 +20,7 @@ default.
2020
## How to use a build script
2121

2222
The 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
2424
pre-requisites of your crate.
2525

2626
Cargo provides the script with inputs via environment variables [specified
@@ -29,10 +29,11 @@ here] that can be used.
2929
The script provides output via stdout. All lines printed are written to
3030
`target/debug/build/<pkg>/output`. Further, lines prefixed with `cargo:` will be
3131
interpreted 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

Comments
 (0)