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 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 = from_str.unwrap;
assert_eq!;
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