byteor_abi/
header.rs

1//! ByteOr-owned ABI header constants.
2//!
3//! ByteOr layouts still use `indexbus-abi`'s `LayoutHeader` and the low-8-bit region kind
4//! discriminator stored in `LayoutHeader.flags`.
5
6/// Capability bits for ByteOr layouts.
7///
8/// These occupy high bits to avoid colliding with `indexbus_abi::caps`.
9pub mod caps {
10    /// Region supports an events chain layout: one slot pool shared by multiple SPSC queues.
11    pub const BYTEOR_CAP_SUPPORTS_EVENTS_CHAIN: u32 = 1 << 16;
12
13    /// Region supports an events chain layout with per-edge MPSC queues.
14    pub const BYTEOR_CAP_SUPPORTS_EVENTS_CHAIN_MPSC: u32 = 1 << 18;
15
16    /// Region supports a sequenced-slots layout: sequencer cursor + slot pool + ring of slot indices.
17    pub const BYTEOR_CAP_SUPPORTS_SEQUENCED_SLOTS: u32 = 1 << 17;
18}
19
20/// Layout flag values for ByteOr layouts.
21///
22/// v1: use the low 8 bits as a kind discriminator (compatible with `indexbus_abi::flags`).
23pub mod flags {
24    /// `LayoutHeader.flags` kind value for the ByteOr events-chain layout (`EventsChainLayout4`).
25    pub const BYTEOR_REGION_KIND_EVENTS_CHAIN: u16 = 100;
26
27    /// `LayoutHeader.flags` kind value for the ByteOr sequenced-slots layout (`SequencedSlotsLayout4`).
28    pub const BYTEOR_REGION_KIND_SEQUENCED_SLOTS: u16 = 101;
29}