Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md: Add note that rerun-if-changed is not emitted. #706

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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