Specify `build.target-dir` in Cargo config
What changed, and why it matters
This commit is a build-system hardening change, not a security fix. It pins the Rust build output directory to the default 'target' folder so that individual developer settings cannot accidentally break the firmware build. There is no indication it addresses a vulnerability or malicious behavior.
No security action needed. Treat as normal build hygiene improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds a rust/.cargo/config.toml file setting build.target-dir = ‘target’. The commit message explains that downstream CMake/Makefiles hardcode paths under rust/target/ to copy the compiled Rust static library, and a contributor-level Cargo config could override the target directory, causing build failures. This is a deterministic-build/reliability fix with no security-relevant code changes.
Changed components
rust/.cargo/config.tomlfirmware build systemInspect captured patch +4 / −0
diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml
new file mode 100644
index 0000000..58061e3
--- /dev/null
+++ b/rust/.cargo/config.toml
@@ -0,0 +1,4 @@
+[build]
+## This path is hardcoded into the Makefiles, so make sure a contributor’s
+## config hasn’t overridden it.
+target-dir = "target"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.