Skip to main content

compile_geometry_segment

Function compile_geometry_segment 

Source
pub fn compile_geometry_segment(
    spec: &UnsealedGeometrySpec,
    budget_bytes: usize,
    out_buf: &mut [u8],
) -> Result<usize, TopologyError>
Expand description

Compile spec into a 64-byte-aligned GTOP binary segment inside out_buf.

Fails closed with TopologyError::BudgetExhausted if the segment + scratch bytes exceed budget_bytes, and with TopologyError::BufferTooSmall if out_buf cannot hold the segment.