| Crates.io | baobao-ir |
| lib.rs | baobao-ir |
| version | 0.5.0 |
| created_at | 2025-12-24 15:35:04.01609+00 |
| updated_at | 2025-12-24 15:35:04.01609+00 |
| description | Intermediate representation types for Bao CLI generator |
| homepage | https://github.com/roushou/bao |
| repository | https://github.com/roushou/bao |
| max_upload_size | |
| id | 2003434 |
| size | 23,510 |
Intermediate representation types for Bao CLI generator.
This crate provides unified type definitions used across the Bao code generation pipeline. These types serve as the single source of truth for configuration and resource representation, bridging manifest parsing and code generation.
bao.toml (TOML) → bao-manifest (parsing) → bao-ir (unified types) → codegen
The IR types are designed to be:
AppIR, AppMeta)Operation, CommandOp)Resource, DatabaseResource, HttpClientResource)Input, InputType, InputKind)PoolConfig)SqliteOptions, JournalMode, SynchronousMode)This crate is used internally by bao-manifest and language-specific code generators. You typically don't need to use it directly unless you're implementing manifest lowering or a new language generator.
use baobao_ir::{AppIR, AppMeta, CommandOp, Input, InputType, InputKind};
// Create an application IR
let app = AppIR {
meta: AppMeta {
name: "myapp".into(),
version: "0.1.0".into(),
description: Some("My CLI application".into()),
author: None,
},
resources: vec![],
operations: vec![],
};
This project is licensed under the MIT license.