Erlang/Elixir NIFs for nim

Fairly complete NIF API bindings for nim:

Actively working on making it more nim-idiomatic, but it likely won’t end up with extreme convenience like embedding nim source within an Elixir module, etc… Possibly suited to use cases like Nerves. nim’s owned refs / “newruntime” will likely end up being especially beneficial to this end. Currently–until newruntime is complete–it looks like avoiding allocations (or allocating with enif_alloc() ?) and avoiding nim refs (traced pointers) are reasonable constraints. Of course, nim’s GC can also be entirely disabled.

Feedback and collaboration welcomed.


Hi, I found one typo.

Here is @on_load:

but in example is @onload:

1 Like

Amusingly, I was talking to a friend about this the other day. Even came up with the name nimler.

Happy to see someone else has already done the work, and even happier to finally be able to write some NIFs in something that isn’t Rust or C.

1 Like

Haha, yeah, the naming was kind of predictable.

Update: nim devel has a new reference-counting GC. The nimler tests now run with --gc:arc, and it actually seems like a huge win for this use case.