diff options
-rw-r--r-- | book/src/tutorial-3.md | 14 |
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/`. |