airl-ir 0.1.0

Core IR data structures for AIRL (AI-native Intermediate Representation Language)
Documentation

AIRL IR - Core intermediate representation data structures.

This crate defines the typed IR used throughout the AIRL system. The IR is designed to be serialized to/from JSON, making it easy for AI agents to generate and manipulate.

Example

use airl_ir::Module;

let json = r#"{
    "format_version":"0.1.0",
    "module":{"id":"m","name":"main",
        "metadata":{"version":"1","description":"","author":"","created_at":""},
        "imports":[],"exports":[],"types":[],
        "functions":[]}
}"#;
let module: Module = serde_json::from_str(json).unwrap();
assert_eq!(module.name(), "main");

Module organization

  • [node] — expression and statement nodes (16 variants)
  • [types] — the type system
  • [effects] — the effect system
  • [module] — top-level module, function, and parameter definitions
  • [ids] — strongly-typed identifiers
  • [version] — content-addressable module versions
  • [graph] — high-level graph container with validation
  • [display] — pretty-printing for debugging
  • [symbol] — symbol interning helpers