build-logic: track shaders and build.rs as cargo task inputs
- Commit
f9912f73fa823ab2fced1d84c95d289a62867c8d- Author
- vayun-mathur <[email protected]>
- When
- 2026-09-12 02:59 UTC (2 months ago)
- Parents
f17e599
Diff
build-logic/src/main/kotlin/RustNative.kt
diff --git a/build-logic/src/main/kotlin/RustNative.kt b/build-logic/src/main/kotlin/RustNative.ktindex eb96571052..310e29fce2 100644--- a/build-logic/src/main/kotlin/RustNative.kt+++ b/build-logic/src/main/kotlin/RustNative.kt@@ -114,6 +114,15 @@ fun Project.rustNativeLib( inputs.dir("src/main/rust/src") inputs.file("src/main/rust/Cargo.toml")+ // The crate's own build script and whatever it generates from. `:library:ml`'s+ // build.rs compiles `shaders/*.comp` to SPIR-V and `include_bytes!`s the result, so+ // a shader edit changes the .so - but without these two the task stays up to date,+ // cargo is never invoked, and the old SPIR-V ships. That failure is silent and it+ // makes shader A/B measurements read as "no effect".+ //+ // Optional because not every Rust module here has either.+ file("src/main/rust/build.rs").takeIf { it.isFile }?.let { inputs.file(it) }+ file("src/main/rust/shaders").takeIf { it.isDirectory }?.let { inputs.dir(it) } // Root workspace unified (Cargo.toml + Cargo.lock + rust-toolchain.toml) inputs.file(rootProject.file("Cargo.toml")) inputs.file(rootProject.file("Cargo.lock"))