zigler v0.2.0 API Reference
Modules
Phase One of Zigler compilation process.
all code responsible for generating zig code lives in this module.
Generates code for long-running nifs.
Translates the docstrings from your Zig code into Elixir documentation.
this struct represents all information a zigler module bound to a nif should have. WIP.
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
Hooks your zig code into ExUnit, by converting zig tests into ExUnit tests.
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.
gets a zig version and puts it into the zigler directory under the subdirectory zig.