VOID Native Interop

High-level code.
A real C boundary.

VOID can stay high level for normal game code while exposing an explicit unsafe path for C libraries, native structures, callbacks, stack memory, and low-level memory operations.

Native foundation

The low-level pieces work together through one ABI path.

The native layer is project-controlled and explicit. The compiler emits ordinary C declarations/calls and lets the platform compiler/linker finish the job.

Pointers

Current Pointer types, address-of, dereference, arithmetic, comparisons, parameters/returns, void*, pointer properties on unsafe classes/interfaces/value types, virtual/interface pointer-property dispatch, pointer constructors, and pointer ref/out/in constructor parameters inside the existing unsafe boundaries.

Native structs

Current Unmanaged C-compatible structures cross the ABI with native field layout.

Native by-reference parameters

Current Native ref, out, and in lower to the pointer forms required by C APIs.

Bindings & aliases

Current Type-qualified native bindings and [Native("symbol")] aliases keep VOID-facing names readable.

Libraries & callbacks

Current Projects declare native libraries/search paths; unsafe delegates can carry pointer returns/parameters and ref/out/in pointer forms; compatible static methods cross the ABI as callback function pointers; and callback parameters reuse the same ABI-safe by-reference lowering.

Memory primitives

Current sizeof, memory copy/clear, and stackalloc cover focused unmanaged-memory needs.

Project-local native dependencies

Current Relative library paths keep native dependencies beside the project, while VOID library projects can emit their own lib<ProjectName>.a archives and stable [Export] C symbols for VOID or plain-C consumers.

Native debug source mapping

Current Debug builds preserve VOID filenames and statement line numbers through generated C #line directives and standard GCC/Clang debug information.

Exception boundaries

Current VOID exception propagation is integrated with native and reusable-library boundaries without permitting uncontrolled raw unwinding through C ABI frames; invalid boundary cases receive focused diagnostics.

Why this matters

Native libraries can become ordinary game dependencies.

Audio, windowing, compression, platform APIs, custom C libraries, and future engine-facing native code can be bound without giving up the high-level language. VOID code can also be packaged back out as a reusable native archive, so the same ABI works in both directions. Native debugging still reports the originating VOID source lines.