HIBANA Mark

HIBANA

Session-Typed Choreographic Programming for Rust

Rust 2024 • no_std • no-alloc-oriented • affine endpoints

HIBANA

Session-Typed Choreographic Programming for Rust

Rust 2024 • no_std • no-alloc-oriented • affine endpoints

Session-typed choreography for Rust protocols.

Hibana is a Rust 2024, #![no_std], no-alloc-oriented runtime for session-typed choreographic programming, inspired by affine multiparty session types. A protocol crate describes communication once as a global choreography, projects each participant into a compact local program, attaches transport and storage through hibana::runtime, and hands application code a small affine Endpoint.

Status: hibana 0.9.1 is published on crates.io.

use hibana::g;

// 1. Write one global choreography.
let app = g::seq(
    g::send::<0, 1, g::Msg<1, u32>>(),
    g::send::<1, 0, g::Msg<2, u32>>(),
);

// 2. Protocol crates project, attach transport, and return Endpoint.
// 3. Applications drive only the localside path.
endpoint.send::<g::Msg<1, u32>>(&7).await?;
let reply = endpoint.recv::<g::Msg<2, u32>>().await?;

Choreography First

hibana::g builds protocols with send / seq / route / par. Projection turns one global shape into per-role programs.

Affine Endpoint

send(), recv(), offer(), and route branch operations advance only the projected continuation.

Two Public Surfaces

Application code uses hibana::g and Endpoint. Protocol crates use hibana::runtime.

no_std Core

Rust 2024 · #![no_std] · no_alloc-oriented — caller-provided storage and runtime resources derived from projection.

No Shared Protocol State

Protocol state is affine endpoint ownership. Shared memory, atomics, globals, and side channels are not route or loop authority.

Fail Closed

Endpoint errors are evidence, not route arms. Operational deadlines poison a generation; protocol-visible time is an explicit choreography route.

Crates and Demos

hibana is the core crate. Downstream crates prove concrete integration without expanding the core API.

hibana Core

Session-typed choreography runtime, typed projection, affine endpoint progress, transport abstraction, resolver sites, and fixed-cost tap evidence.

crates.io/crates/hibana · github.com/hibanaworks/hibana

hibana-pico Proof Target

Cargo-native projection, attach, and run integration layer for raw Hibana choreography, including WASI P1 import completion through Endpoint/carrier progress.

github.com/hibanaworks/hibana-pico

hibana-mgmt Planned

Management choreography prefixes and payload owners for protocol crates that need operational control flows.

github.com/hibanaworks/hibana-mgmt

hibana-epf Planned

Policy-slot appliance for bytecode verification, installation, and execution outside the Hibana core crate.

github.com/hibanaworks/hibana-epf

Get Started

cargo add hibana
[dependencies]
hibana = "0.9.1"

crates.io · docs.rs · GitHub