Skip to main content

rustc_check

Function rustc_check 

Source
pub fn rustc_check(
    source: &str,
    cache_dir: &Path,
) -> Result<Vec<LogosError>, CompileError>
Expand description

Run rustc’s analysis over a LOGOS program and translate every finding back to English with real user-source spans — the flycheck engine.

cache_dir is a persistent per-workspace directory: the first run stages the runtime crates and compiles them; later runs are incremental. Uses cargo check (no codegen, no linking).

Fail-loud contract: Ok(vec![]) means cargo ran AND found nothing. A cargo failure that translates to no LOGOS finding is a Build error, not a silent all-clear.