Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ fn main() {
.file("foo.c")
.file("bar.c")
.compile("foo");
println!("cargo:rerun-if-changed=foo.c");
println!("cargo:rerun-if-changed=bar.c");
}
```

Expand Down Expand Up @@ -101,6 +103,10 @@ functions with hard requirements on some variables supplied by [cargo's
build-script driver][cargo] that it has the `TARGET`, `OUT_DIR`, `OPT_LEVEL`,
and `HOST` variables.

Note that `cc-rs` does not automatically tell cargo to rebuild when the c files
are changed, nor the environment variables such as CFLAGS. See the example to
manually instruct cargo to rebuild when the source files change.

[cargo]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#inputs-to-the-build-script

## Optional features
Expand Down