From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Rust crate" |
|---|
| claim | "A file named build.rs in the package root is compiled by cargo and executed just before building the package; the registry index records for each version a cksum, the SHA-256 of the .crate file." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Rust crate" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "cargo build of a package containing build.rs" |
|---|
| effect | "arbitrary build script runs on the building machine" |
|---|
| condition | "build.rs in package root (or manifest build key)" |
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Placing a file named build.rs in the root of a package causes Cargo to compile and execute it just before building the package." |
|---|
| repo | "https://github.com/rust-lang/cargo" |
|---|
| commit | "3022244f7ba6d509b2db1fc65900f4bdda1d52a9" |
|---|
| path | "doc/book/src/reference/build-scripts.md" |
|---|
| lines | "1-12" |
|---|
|
| type | "documentation" |
|---|
| detail | "cksum: SHA256 checksum of the .crate file." |
|---|
| repo | "https://github.com/rust-lang/cargo" |
|---|
| commit | "3022244f7ba6d509b2db1fc65900f4bdda1d52a9" |
|---|
| path | "doc/book/src/reference/registry-index.md" |
|---|
| lines | "169-170" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "build.rs runs before the package build" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T07:16:16.351Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:38:56.978Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched doc/book/src/reference/build-scripts.md (lines 1-40) and registry-index.md (165-171) at cargo 3022244f7ba6: build.rs in the package root is compiled and run just before building the package; the note says package.build can rename or disable it (the fact's condition field already mentions the manifest build key); cksum is the SHA256 of the .crate file. Documentation only, cargo's code not read." |
|---|
|
|
|---|