Modules and ABI
Static modules, .zxm bundles, native libraries, and C ABI surfaces.
Zynx source files can compile to executables, object files, or .zxm module
bundles. Normal source loads modules with import, project manifests,
lockfiles, module paths, and source or static .zxm bundles.
zynx -o math.zxm math.zx
zynx module info math.zxm
zynx module verify math.zxm
Use --module-path <dir> to add module search roots.
zynx --dynamic -o libmath.zxm libmath.zx
Dynamic runtime loading remains experimental/internal. Normal source rejects
require(...); dynamic bundles cannot be imported with ordinary import.
Use static imports and locked package inputs for public code.
foreign "C" declarations, foreign library, native archive inputs, generated
headers, @symbol, @unmangled, and @c_name form the current C
interoperability surface. Foreign calls require unsafe context, and the current
ABI surface is intentionally narrow: integer and float scalars, raw pointers,
and void returns are supported; managed values, vectors, futures, error
unions, interfaces, generics, async functions, throwing foreign functions,
variadics, and by-value aggregate ABI are rejected.
foreign "C" fn puts(s: *u8) -> i32;
extern is reserved for external Zynx-linkage declarations, not C ABI imports.
Warning
.zxmlayout, dynamic loading behavior, and ABI details are implementation details until the module format is versioned.