Skip to main content

compute_struct_layout

Function compute_struct_layout 

Source
pub fn compute_struct_layout(
    fields: &[StructField],
    types: &BTreeMap<TypeId, AirType>,
) -> Option<(Vec<u64>, u64)>
Expand description

Computes struct layout: field byte offsets and total size (including tail padding).

Uses a default pointer width of 8 bytes (64-bit). For target-aware layout, use compute_struct_layout_with_ptr.

Returns (field_offsets, total_size) or None if any field has an unknown type.