Skip to main content

ABI_EPOCH

Constant ABI_EPOCH 

Source
pub const ABI_EPOCH: u32 = 2;
Expand description

Hand-bumped ABI epoch. Sizes and alignments can’t see every layout change: Event::port landed in former padding, so event_size stayed the same while a stale shell would read uninitialized padding as the port. Bump this when any boundary-crossing type changes layout invisibly to the size / align fields below. When AbiCanary itself gains or loses a field, bump the export symbol version instead (truce_abi_canary_vN) - the canary crosses the boundary by value, so two different canary layouts must never call each other.

Epoch 2: Event grew port: u8 in former padding (multi-port MIDI).