Development · Evolving reference
NativeImportMode
Selects linked or runtime symbol resolution for a native import.
Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. 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 ↗