0.2.0 Preview 1 · Frozen documentation
NativeFieldLayout
Refines one field offset or alignment inside a profile-qualified native type.
Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. Read the status →
Module std.abi
import std.abi;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
NativeFieldLayout
pub attribute NativeFieldLayoutRefines one field offset or alignment inside a profile-qualified native type.
The requested alignment may raise but never lower the profile-selected field alignment; an offset must preserve nonoverlap and enclosing bounds.
NativeFieldLayout.Offset
pub Offset: usize?;Stores an optional exact byte offset.
NativeFieldLayout.Alignment
pub Alignment: usize?;Stores an optional power-of-two field alignment raise.
Documentation snapshot: October 24, 2026 About versions ↗