Module dependency graph for the halideiser codebase.
halideiser.toml ──► Pipeline Parser ──► Idris2 ABI Proofs
(src/manifest/) (src/interface/abi/)
│ │
▼ ▼
Halide Codegen ◄──── Generated C Headers
(src/codegen/) (src/interface/generated/)
│
▼
Schedule Tuner ──► Compiled Pipeline
(auto-tuning) (native code)
│
▼
Zig FFI Bridge
(src/interface/ffi/)
| Directory | Language | Purpose |
|---|---|---|
|
Rust |
CLI entry point (clap subcommands) |
|
Rust |
Library API surface |
|
Rust |
Parse and validate |
|
Rust |
Emit Halide algorithm + schedule code |
|
Rust |
Runtime ABI types mirroring Idris2 proofs |
|
Idris2 |
Pipeline stage types, scheduling primitives, hardware targets |
|
Idris2 |
Halide |
|
Idris2 |
FFI declarations for pipeline compilation and execution |
|
Zig |
C-ABI FFI implementation |
|
Zig |
Build shared/static library |
|
Zig |
Integration tests verifying FFI matches ABI |
|
C |
Auto-generated headers from Idris2 ABI |
|
Rust |
End-to-end pipeline tests |
|
TOML/Rust |
Example pipeline manifests |
|
— |
Formal verification artifacts |
|
— |
Stapeln container definitions |
|
AsciiDoc |
Architecture, theory, attribution |
|
A2ML/TOML |
State, ecosystem, policies, bot directives |
main.rs ├── manifest::load_manifest() ├── manifest::validate() ├── codegen::generate_all() ├── codegen::build() └── codegen::run() lib.rs ├── pub mod abi (Rust-side ABI types) ├── pub mod codegen (Halide code generation) └── pub mod manifest (TOML parser + validator)
Halideiser.ABI.Types ├── PipelineStage (blur, sharpen, resize, convolve, ...) ├── SchedulePrimitive (tile, vectorize, parallelize, compute_at, ...) ├── HardwareTarget (x86_SSE, x86_AVX, ARM_NEON, CUDA, OpenCL, WASM) ├── TileSize (with proof: divides dimension) ├── BufferDimension (width, height, channels, frames) └── Result, Handle, Platform (shared ABI base) Halideiser.ABI.Layout ├── imports Types ├── HalideBufferLayout (stride, extent, min per dimension) ├── BufferBoundsProof (all accesses within allocated memory) └── LayoutCompatibility (producer output fits consumer input) Halideiser.ABI.Foreign ├── imports Types, Layout ├── halideiser_compile_pipeline (pipeline description → compiled code) ├── halideiser_execute_pipeline (run compiled pipeline on buffer) ├── halideiser_autotune (search schedule space) └── halideiser_init / halideiser_free (lifecycle)
src/main.zig ├── halideiser_init() → allocate pipeline context ├── halideiser_free() → release resources ├── halideiser_compile_pipeline() → invoke Halide AOT compiler ├── halideiser_execute_pipeline() → run compiled pipeline on buffers ├── halideiser_autotune() → auto-tune schedule parameters ├── halideiser_version() → version string └── halideiser_last_error() → thread-local error test/integration_test.zig └── verifies all exported functions match ABI contract
User: halideiser.toml
│
├─ [workload]
│ name, entry, strategy
│
├─ [pipeline]
│ stages = ["gaussian_blur", "sharpen", "resize"]
│
├─ [buffers]
│ input = { width = 1920, height = 1080, channels = 3, type = "uint8" }
│ output = { width = 960, height = 540, channels = 3, type = "uint8" }
│
├─ [schedule]
│ tile_x = 32, tile_y = 8
│ vectorize_width = 8
│ parallelize = true
│
└─ [target]
hardware = "x86_avx2"