baryl 0.0.4

Public SDK for Baryl, a full-system emulation and introspection engine
Documentation
//! Memory that outlives the run that allocated it.
//!
//! Anything a component wants back after a checkpoint restore has to live in
//! the pool: a `Box` or a `Vec` is host memory, and a restore is a different
//! host process. `AllocRef`, reached as `ctl.subs.alloc`, is the door to it,
//! and it opens two ways.
//!
//! `leak_and_initialize_sbx` and `leak_and_initialize_anon` claim a **named
//! anchor**: one fixed allocation per name, whose address is the same in every
//! run and after every restore. That is how a component finds its own state
//! again — claim it under a name at `#[core(init)]` and the pointer you get
//! back is the pointer you got last time. `sbx` keeps the bytes across a
//! restore; `anon` keeps only the address.
//!
//! `SbxAlloc` is the checkpoint heap dressed as a Rust `Allocator`, for
//! variable-sized storage — it is what `BVec` and `BMap` are built over, and
//! the only one of the pool's arenas that can free.

mod pool;

#[cfg(feature = "component")]
pub use pool::SbxAlloc;

// Bindgen output cannot satisfy the workspace lints; the allow stops here.
mod generated {
    #![allow(non_camel_case_types, non_upper_case_globals, dead_code)]
    include!("generated.rs");
}
pub use generated::*;