3
7
BIOZIG
libbiozig THE C-ABI DYNAMIC LIBRARY

libbiozig is the core artifact of the BioZig project. It is a highly optimized library that exposes the entire BZ pipeline through a stable C Application Binary Interface. Support exists for bindings in cpp, java, julia, matlab, python, r, swift, and wasm via exact header mappings.

Context & Memory Management

Because BZ relies on Arena Allocators instead of scattered mallocs, the C-ABI requires an explicit context lifecycle to manage the global arena (c_arena).

biozig_context_create
export fn biozig_context_create() callconv(.c) c_int
Initializes the global BZ engine and its memory arena. Must be called before any other C-ABI functions. Returns 0 on success.
biozig_context_destroy
export fn biozig_context_destroy() callconv(.c) c_int
Instantly deallocates the entire engine memory arena. Guarantees no memory leaks when bridging with Python/R.