zigler v0.3.0 API Reference
Modules
Fist phase of the Zigler compilation process.
all code responsible for generating zig code lives in this module.
Generates code for long-running nifs.
handles instrumenting elixir code with hooks for zig NIFs.
Translates the docstrings from your Zig code into Elixir documentation.
handles parsing zig code for the purposes of documentation
decides what features should be documented on zig doc
.
this struct represents all information a zigler module bound to a nif should have. WIP.
main parsing module: Handles general parsing of nif, resource directives and code elements succeeding those.
parses errors emitted by the zig compiler
For parsing, looking for imports, cimports, and usingnamespace directives.
This datastructure represents structured information about a single nif
inside of a Zigler.sigil_Z/2
block. This is used to generate the
exported_nifs
variable which is an array of ErlNifFunc
structs. The
following keys are implemented
resource parser object
resource cleanup struct
parses zig code and converts test blocks to test functions
occasionally zig and/or the llvm bits that get pulled down have errors. This module actively patches code when this situation occurs.
handles creating typespecs for zig Nif functions
Hooks your zig code into ExUnit, by converting zig tests into ExUnit tests.
contains all parts of the Zigler library involved in calling the zig compiler toolchain
This struct contains adapters designed to facilitate interfacing the BEAM's c-style helpers for NIFs with a more idiomatic Zig-style of programming, for example, the use of slices instead of null-terminated arrays as strings.
Provides erlang's NIF convenience functions to your Zig code.
Exceptions
Translates to ExUnit.AssertionError
. Mostly used in Zig unit tests.
Translates to Elixir FunctionClauseError
.
Mix Tasks
Used to generate documentation from your zig code and incorporate it into your Elixir documentation.