When integrating Elixir with native code (e.g., written in C) one of the important aspects is adapting new tooling responsible for compiling that code into our workflow. Of course, a native compiler can be invoked manually, but this approach is far from perfect, mainly for the following reasons:
- you have to take care of compiling the code each time it changes,
- if someone uses your project as a dependency (no matter whether directly or indirectly), they still have to execute the native compiler manually,
- if you wish to support different operating systems, you have to handle this yourself,
- if you have several projects and dependencies in the native code between them, you need to resolve these dependencies somehow.
While creating Membrane Framework, we’ve encountered all of these issues.
Bundlex is supposed to ease the management of the NIF dependencies.