0.2.0 Preview 1 · Frozen documentation
NativeImportMode
Selects linked or runtime symbol resolution for a native import.
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.
NativeImportMode
pub enum NativeImportModeSelects linked or runtime symbol resolution for a native import.
NativeImportMode.Linked
Linked;Emits an ordinary unresolved native symbol for the linker.
NativeImportMode.RuntimeRequired
RuntimeRequired;Requires runtime symbol resolution for the owning table to succeed.
NativeImportMode.RuntimeOptional
RuntimeOptional;Permits runtime resolution to produce an unavailable field.
NativeImportMode.RuntimeCompanionRequired
RuntimeCompanionRequired;Requires lookup in the explicit owning companion image.
NativeImportMode.RuntimeCompanionOptional
RuntimeCompanionOptional;Allows an absent companion slot to become None without other-image lookup.
Documentation snapshot: October 24, 2026 About versions ↗