Gradle's exec environment does not inherit the user's interactive shell PATH, so cargo-ndk could not find cargo even when it lived in ~/.cargo/bin. Prepend ~/.cargo/bin to PATH for buildRustCertgen so the Rust toolchain resolves reliably from any shell.