Skip to main content

cache_path_for_source

Function cache_path_for_source 

Source
pub fn cache_path_for_source(language: &str, source: &str) -> Option<PathBuf>
Expand description

Path where a compiled artefact for (language, source) should land. The filename is <sha256-of-source>.wasm; collisions are vanishingly unlikely and the hash also doubles as a cache key for “is this source the same as last time?”.

Returns None only when cache_dir() is unavailable. The caller can fall back to a tempfile in that case.