Native code compiler: JIT assembler (default) with C compiler fallback.
Default compile uses JIT assembler. compile-c falls back to C compiler. compile-asm is the pure JIT path.
compile-to-cGenerate C source code from an (fn …) expression.
Parameters:
LIST — A (fn (_ params…) body) expressionReturns: STRING — Generated C source code
compile-writeWrite a string to a file. Returns the path.
Parameters:
STRING — Output file pathSTRING — Content to writeReturns: STRING — The path written to
compile-ccInvoke the C compiler on a source file to produce a shared library.
Parameters:
STRING — C source fileSTRING — Output shared library pathcompile-loadLoad a compiled shared library and return fn_0 as a callable primitive.
Parameters:
STRING — Path to shared libraryReturns: PRIM — Native function
compile-cc-flagsCompiler flags for the current platform.
Returns: LIST — Platform-specific cc flags
compile-extShared library file extension for the current platform.
Returns: STRING — .bundle or .so
compile-cCompile an (fn …) expression to a native primitive via C compiler. Caches by expression hash.
Parameters:
LIST — A (fn (_ params…) body) expressionReturns: PRIM — Compiled native function
compile-asmcompileCompile an (fn …) expression to native code. Pure expressions use JIT assembler; fvar expressions use C compiler with persistent caching.
Parameters:
LIST — A (fn (_ params…) body) expressionReturns: PRIM — Compiled native function
compile-batchCompile multiple (fn …) expressions in a single cc invocation.
Returns: LIST — List of compiled native primitives