Skip to content

How Incan works

This page is a user-level mental model of what happens when you run Incan.

The short version

In the current beta, Incan checks .incn source code, lowers it through the Rust backend, and builds an executable. Generated Rust is inspectable backend output today, but the longer-lived public contract is the checked source, diagnostics, build reports, semantic facts, package metadata, and native artifacts.

Pipeline (conceptual)

flowchart LR
    source[Incan source] --> frontend[Parser and type checker]
    frontend --> facts[Checked program facts]
    facts --> backend[Rust backend]
    backend --> workspace[Generated Rust workspace]
    workspace --> artifact[Native artifact]
    facts --> evidence[Diagnostics, reports, and codegraph]

The checked Incan program owns the public meaning. Generated Rust is inspectable backend output, while diagnostics and reports expose stable tooling facts.

What this means in practice

  • Incan programs are compiled (not interpreted).
  • The “happy path” is: edit code → run incan → get an executable or an error.
  • When things fail, you typically care about which stage failed (parse, typecheck, codegen, build).

Where to go next