cadi-builder
CADI build engine and transformation pipeline for WASM and binaries.
About CADI
CADI is a universal build and distribution system. cadi-builder implements the transformation pipeline that converts source code and artifacts into WASM IR, binaries, and containers.
Features
- Multi-stage transformation pipeline: Source → IR → WASM → Binary/Container
- Content-addressed output: All build artifacts identified by SHA256
- Efficient incremental builds: Skip already-built chunks
- Build receipts: Full provenance with build metadata and timestamps
- Async/await: Tokio-based concurrent transformations
- Comprehensive logging: Tracing integration for detailed build info
Installation
Add this to your Cargo.toml:
[]
= "1.0"
Basic Usage
use Builder;
use Chunk;
async
Pipeline Stages
- Source Analysis: Parse and analyze source code
- IR Generation: Convert to WASM intermediate representation
- Optimization: Apply optimizations and transformations
- Code Generation: Generate binary from IR
- Attestation: Create build receipts and sign artifacts
Integration
- Depends on cadi-core for chunk types
- Used by cadi-registry for chunk distribution
- Works with cadi-scraper for source code ingestion
Error Handling
Uses thiserror for comprehensive error types:
match builder.build
Documentation
Full API documentation at docs.rs/cadi-builder
License
MIT License