Generates the interface between native C code and Elixir
open sourceApache-2.0free
Unifex is a tool for generating interfaces between native C code and Elixir. You describe a native interface concisely and it generates the boilerplate, with abstractions over binaries and state, and the same C code works either as a NIF or as a CNode because it doesn't depend on erl_nif or ei directly. It compiles and loads the native code with Bundlex, and the Membrane Framework team maintains it.
Problems it solves
- call C code from Elixir without writing NIF boilerplate by hand
- write native code for Elixir that can run as a NIF or a CNode
- add a C library to an Elixir media pipeline
Features
- generates Elixir-to-C interface boilerplate from a concise spec
- the same native code runs as a NIF or a CNode
- abstractions over binaries and state in native code
- compiles and loads native code through Bundlex
Alternatives
The same job
These do what Unifex does.
- Rustler Write Erlang and Elixir NIFs in safe Rust
