summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-06-05 09:53:46 -0700
committerGitHub <noreply@github.com>2017-06-05 09:53:46 -0700
commit8a0934763ead0e911b24bf685d052e79aeda5f95 (patch)
treef0c819cd9203f5d450a9fdbe442120b61a692f22
parent1f87fc87bc0ffb90e1ff22e19e31b53bfdae64b9 (diff)
parent6cd9289dab47d45a1dabebb2781d73ebad493477 (diff)
Auto merge of #733 - SirVer:patch-1, r=fitzgen
Cargo picks up on build.rs without being told now.
-rw-r--r--book/src/tutorial-3.md14
1 files changed, 3 insertions, 11 deletions
diff --git a/book/src/tutorial-3.md b/book/src/tutorial-3.md
index 7c081a4d..a6a7135e 100644
--- a/book/src/tutorial-3.md
+++ b/book/src/tutorial-3.md
@@ -1,16 +1,8 @@
# Create a `build.rs` File
-First, we have to tell `cargo` that we have a `build.rs` script by adding
-another line to the `Cargo.toml`:
-
-```toml
-[package]
-build = "build.rs"
-```
-
-Second, we create the `build.rs` file in our crate's root. This file is compiled
-and executed before the rest of the crate is built, and can be used to generate
-code at compile time. And of course in our case, we will be generating Rust FFI
+We create a `build.rs` file in our crate's root. Cargo will pick up on the existence of this file and compile and executed it before the rest of the crate is built.
+This can be used to generate code at compile time.
+And of course in our case, we will be generating Rust FFI
bindings to `bzip2` at compile time. The resulting bindings will be written to
`$OUT_DIR/bindings.rs` where `$OUT_DIR` is chosen by `cargo` and is something
like `./target/debug/build/libbindgen-tutorial-bzip2-sys-afc7747d7eafd720/out/`.