Targets · Zig · Native modules

Native modules

The hand-written, per-platform code behind NATIVE functions.

Contents

How a Program becomes Zig, in parts. Start with the introduction, then follow each part into the rendered output and the runtime it links against.

Hand-written Zig behind NATIVE

A NATIVE function needs a zig NATIVE body before it can be built for Zig; that hand-written body is dropped in where the function is called, wrapped so its inputs arrive as plain Zig values. As on JavaScript, the drivers are native code too, and the runtime (Reactive, Context) is itself a native module the rest imports.