LEGACY DOCS · 12.0Stable is 13.2. This page stays because it still owns historical or unchanged contracts.CURRENT 13.2 →
RELEASE LINE13.2 STABLE13.1 PREDECESSOR13.0 PREVIOUS12.4 NATIVE MIRARCHIVE

V12.0 BASE CONTRACT

Structs

Named construction initializes every declaration-order field exactly once.

DByte 12.0 · Language

Contract§

struct Pair[A, B]:
    first: A
    second: B

let pair = Pair[u32, u8](first = 42, second = 1)

Mechanics§

Struct identity includes declaration-order fields and canonical field IDs. Named construction initializes each field once; target layout determines offsets, padding, alignment and total size.

Validation and failure§

Unknown, duplicate and missing fields fail. repr(C) and repr(C, packed) reuse the same layout engine; backend code may not recompute offsets.

Evidence and boundary§

Layout inspection and exact field-address native tests bind source fields to the same canonical offsets.