Skip to main content

Crate cljrs_compiler

Crate cljrs_compiler 

Source
Expand description

Program analysis and optimization for clojurust.

This crate provides:

  • IR — intermediate representation (ANF/SSA) for analysis
  • ANF lowering — convert Form AST to IR instructions (Rust + Clojure front-ends)
  • Escape analysis — track value flow and identify non-escaping allocations
  • IR conversion — Clojure Value data → Rust IR types

The Clojure front-end (cljrs.compiler.anf, cljrs.compiler.escape) produces IR as plain Clojure data. The ir_convert module translates this back to the Rust IrFunction structs that codegen.rs consumes.

Modules§

aot
AOT compilation driver.
codegen
Cranelift code generation: translate IrFunction to native machine code.
ir
Re-export IR types from the cljrs-ir crate.
rt_abi
C-ABI runtime bridge for AOT-compiled clojurust code.

Functions§

register_compiler_sources
Register all compiler Clojure source files as builtin sources in the given GlobalEnv, so that require can load them without filesystem access.