Skip to main content

Crate Map

Every crate in the Verum compiler workspace, with purpose, size, and representative entry points. Line counts reflect the current release.

Layer 0 — Foundation

CrateLOCPurposeKey files
verum_common17 KShared data structures, semantic-type primitivescore.rs
verum_error8 KUnified error hierarchyerror.rs

Layer 1 — Parsing

CrateLOCPurposeKey files
verum_lexer14 KTokenisation via logostoken.rs, lexer.rs
verum_fast_parser89 KMain recursive-descent parserdecl.rs, expr.rs, ty.rs, stmt.rs, pattern.rs, proof.rs
verum_parser49 KLegacy parser (partial, being phased out)
verum_ast47 KAST definitionsexpr.rs, ty.rs, pattern.rs, decl.rs
verum_syntax6 KLossless (red-green) syntax tree infrastructurelib.rs

Layer 2 — Type system & verification

CrateLOCPurposeKey files
verum_types221 KType inference, refinement, dependent + cubical types, protocol coherenceinfer.rs (53 K lines), unify.rs, refinement.rs, cubical.rs, cubical_bridge.rs, protocol.rs, exhaustiveness/
verum_cbgr103 KThree-tier reference analysis suitetier_analysis.rs, escape_analysis.rs, ownership_analysis.rs, concurrency_analysis.rs, lifetime_analysis.rs, nll_analysis.rs, polonius_analysis.rs, smt_alias_verification.rs
verum_smt139 KSMT integration (the SMT backend)z3_backend.rs, cvc5_backend.rs, capability_router.rs, portfolio_executor.rs, proof_search.rs, cubical_tactic.rs
verum_verification59 KHoare logic, VCGen, dependent verifier, tacticshoare_logic.rs, vcgen.rs, proof_validator.rs, tactic_evaluation.rs, dependent_verification.rs
verum_diagnostics19 KError formatting, spans, labelsdiagnostic.rs
verum_modules17 KModule resolution, loader, coherence checkerloader.rs, resolver.rs, coherence.rs, parallel.rs

Layer 3 — Execution (VBC-first)

CrateLOCPurposeKey files
verum_vbc192 KBytecode format, interpreter, VBC codegen, monomorphizationinstruction.rs, bytecode.rs, interpreter/dispatch_table/handlers/ (37 files), codegen/, intrinsics/
verum_codegen81 KLLVM (CPU) + MLIR (GPU) backendsllvm/instruction.rs (22 K lines), llvm/vbc_lowering.rs, mlir/vbc_lowering.rs, link.rs, runtime.rs

Layer 4 — Orchestration & tools

CrateLOCPurposeKey files
verum_compiler161 KPipeline orchestration, derives, hygiene, linker configpipeline.rs (14 K lines), phases/*, derives/*, quote.rs, hygiene/*, linker_config.rs
verum_toolchain2 KToolchain management (~/.verum/toolchains/, stdlib bytecode)lib.rs
verum_lsp33 KLanguage server (LSP 3.17)backend.rs, completion.rs, quick_fixes.rs, diagnostics.rs, hover.rs, exhaustiveness.rs
verum_dap2 KDebug adapter protocol
verum_protocol_types2 KShared LSP / DAP type definitions
verum_interactive13 KREPL + Playbook TUIplaybook/app.rs, execution/pipeline.rs, discovery/, output/
verum_cli32 KCommand-line frontendmain.rs, commands/{build,run,test,verify,lsp,playbook,repl,profile,...}.rs (35 commands), config.rs, cog.rs
verum_integration_testsEnd-to-end integration suiteworkspace-wide

External bindings

CratePurpose
cvc5-sysCVC5 1.3.3 FFI bindings (statically linked)
llvmLLVM 21.x bindings (custom fork)

Totals

  • Internal crates: 24 (22 verum_* + verum_integration_tests + verum_parser legacy).
  • External crates: 2 (cvc5-sys, llvm).
  • Workspace LOC: ~1.36 M Rust lines across the 24 internal crates.
  • Largest files:
    • verum_types/src/infer.rs — 52 845 lines
    • verum_codegen/src/llvm/instruction.rs — 21 502 lines
    • verum_compiler/src/pipeline.rs — 14 358 lines
  • Conformance coverage: 1 506 / 1 507 VCS checks pass (99.93 %).

Build order

cargo resolves the DAG automatically; the conceptual dependency order is:

1. verum_common, verum_error
2. verum_ast, verum_lexer, verum_syntax, verum_diagnostics
3. verum_fast_parser, verum_parser
4. verum_types, verum_cbgr, verum_smt, verum_modules
5. verum_verification, verum_vbc, verum_codegen, verum_toolchain
6. verum_compiler
7. verum_lsp, verum_dap, verum_interactive, verum_cli

See also