One choreography. Compact role programs. Fail-closed progress.
Hibana executes a finite multiparty protocol from one global
choreography. It projects each role to a compact program and checks
every send, receive, and route operation before progress commits. Its
target-neutral API is unconditionally #![no_std], needs
no allocator, uses caller-provided storage, and covers role IDs
0..=255.
Status: hibana 0.9.5 is published on crates.io.
use hibana::{
Endpoint, EndpointError,
g::{self, Msg},
runtime::program::{RoleProgram, project},
};
fn ping_pong() -> (RoleProgram<0>, RoleProgram<1>) {
let choreography = g::seq(
g::send::<0, 1, Msg<1, u32>>(),
g::send::<1, 0, Msg<2, u32>>(),
);
(project(&choreography), project(&choreography))
}
async fn client(endpoint: &mut Endpoint<'_, 0>) -> Result<u32, EndpointError> {
endpoint.send::<Msg<1, u32>>(&7).await?;
endpoint.recv::<Msg<2, u32>>().await
}
Choreography First
send, seq, par, route, and guarded roll describe one global protocol that is projected for every role.
Compact Role Programs
Protocol growth enlarges compact descriptors instead of creating a distinct Rust endpoint continuation type for every state.
Affine Progress
Each successful operation commits exactly one permitted step. Preview, rejection, requeue, and drop before commit publish no progress.
One no_std API
The same allocator-free API runs on hosted and embedded targets, with caller-provided storage derived from actual descriptors and local participants.
Explicit Global Conditions
Distributed fidelity and progress require exact role images, matching wire schemas, a conforming live carrier, and fair endpoint polling.
Measured Footprint
The release gate tracks a 5,514 B modeled Hibana SRAM envelope, a 1,824 B largest linked protocol artifact, and 0 B library .data + .bss.
Core and Integrations
hibana remains protocol-neutral. Integrations own deployment-specific behavior without expanding the core API.
hibana Core
Choreography-derived runtime enforcement, compact role projection, affine endpoint progress, transport abstraction, resolver sites, and fixed-cost observation evidence.
hibana-pico Integration
Cargo-native projection, attach, and run integration for raw Hibana choreography, including WASI P1 examples driven through endpoint and carrier progress.
hibana-mgmt Management
Ordinary management choreography prefixes and payload owners kept outside the protocol-neutral Hibana core.
hibana-epf Evidence
Compact typed evidence images, ingestion, evaluation, and replay built from Hibana observation records outside the core crate.