INNER CODE UNIT · Rust
discover
NVlabs/cuda-oxide · cuda-oxide/crates/cuda-artifact-finalizer/src/lib.rs:183
pub fn discover() -> Result<Self, FinalizerError> {
Ok(Self {
compiler: NvvmCompiler::discover()?,
linker: LtoLinker::discover()?,
})
}
/// Discover tools using a validated parent-process handoff as a digest
/// acceleration hint.
///
/// Each DSO is opened and its retained-file identity is checked in this
/// process. A mismatch falls back to hashing the newly opened file. The
/// caller must still compare [`Self::provenance_digest`] with the semantic
/// provenance it expected.
pub fn discover_with_handshake(
handshake: &MaterializerHandshakeV1,
) -> Result<Self, FinalizerError> {
if !handshake.has_consistent_provenance() {