adapto_compiler 0.2.5

Adapto template compiler — IR generation, codegen, dependency graphs
Documentation

adapto_compiler

Template compiler for Adapto — transforms parser AST into intermediate representation with static/dynamic segments, dependency graphs, and route manifests.

Part of the Adapto web framework.

Features

  • AST to IR — compile parsed .adapto files into ComponentIR
  • Static/dynamic segments — split templates for optimal rendering
  • Dependency graphs — track reactive data dependencies
  • Route manifests — generate route tables from compiled components
  • Validation — catch template errors at compile time

Quick Start

[dependencies]
adapto_compiler = "0.2"
use adapto_compiler::Compiler;
use adapto_parser::parse_file;

let ast = parse_file(source)?;
let compiler = Compiler::new();
let ir = compiler.compile(&ast)?;

// Access compiled output
println!("Component: {}", ir.name);
println!("Static segments: {}", ir.static_segments.len());
println!("Dynamic segments: {}", ir.dynamic_segments.len());
println!("Dependencies: {:?}", ir.dependency_graph);

License

MIT — Saken Tukenov