HIBANA Mark

HIBANA

Affine Multiparty Session Types for Rust

Const projection • Affine Cursors • EPF VM • Deterministic observability

HIBANA

Affine Multiparty Session Types for Rust

Const projection • Affine Cursors • EPF VM • Deterministic observability

What if your compiler could prove your protocol is deadlock-free?

Hibana is an affine MPST engine for Rust with a #![no_std] / #![no_alloc]-oriented core. Write your global choreography once, project it at compile time, and run affine cursors that prevent invalid protocol progression by construction.

Status: Preview. Core ideas are stable, but APIs may evolve.

// 1. Global Choreography
const PING_PONG: g::Program<_> = g::seq(
    g::send::<Client, Server, Ping>(),
    g::send::<Server, Client, Pong>(),
);

// 2. Compile-Time Projection
const CLIENT: g::RoleProgram<0, _> = g::project(&PING_PONG);

// 3. Affine Execution
// Compiler enforces protocol compliance.
let (client, _) = client.flow::<Ping>()?.send(&42u32).await?;
let (client, pong) = client.recv::<Pong>().await?;

Const Projection

g::Program builds protocols with g::send / seq / par / route. Pure const fn composition, macro-free.

Affine Cursors

Every step is a linear resource. You cannot skip a step, reuse a step, or drop a session mid-flight without explicit handling.

Transport Agnostic

BindingSlot and transport APIs keep wire I/O separate from localside choreography code.

Embedded First

Rust 2024 · #![no_std] · no_alloc-oriented core — predictable resource usage on core protocol paths.

Deterministic Observability

Dual-ring tap architecture minimizes observer impact while keeping replay/debugging deterministic.

Effect Policy Filter

eBPF-inspired bytecode VM. Hot-reloadable dynamic policies.

Crates and Demos

hibana is the core crate. Everything else is a public demo proving practical usability.

hibana Core

Affine MPST semantics, compile-time projection, runtime control, and EPF policy execution.

github.com/hibanaworks/hibana

hibana-quic Beta

QUIC integration demo showing end-to-end session driving with real transport behavior.

github.com/hibanaworks/hibana-quic

hibana-agent Demo

AI control automation demo implemented with Hibana session types and choreography-driven branching.

github.com/hibanaworks/hibana-agent

Get Started

[dependencies]
hibana = { git = "https://github.com/hibanaworks/hibana" }

GitHub · Discussions · Issues