C3nif.Compiler (C3nif v0.2.0)
View SourceCompiler module for C3 NIFs.
This module handles the compilation of C3 code and generation of Elixir bindings
during the @before_compile phase.
Code Generation
The compiler automatically:
- Parses C3 source to find NIF functions with
@nifannotations - Detects
on_load/on_unloadcallback functions - Generates the NIF entry point code (func array + nif_init)
- Appends generated code to user's C3 source before compilation
Summary
Functions
Compiles C3 source code into a NIF shared library.
Returns the path to the C3nif manifest file.
Run the c3c executable with the given arguments.
Returns the staging directory for a module's build files.
Functions
Compiles C3 source code into a NIF shared library.
Options
:module- The Elixir module name:otp_app- The OTP application:c3_code- The C3 source code:c3_sources- Optional list of additional C3 source paths/globs:output_dir- Directory for the compiled library:skip_codegen- If true, skip automatic entry point generation (default: false)
Returns the path to the C3nif manifest file.
Run the c3c executable with the given arguments.
Options:
:cd— working directory
Returns {:ok, output} or {:error, {exit_code, output}}.
Returns the staging directory for a module's build files.