No description
Find a file
wltsmrz 56c08c22db
Merge pull request #19 from fxn/patch-2
Revises spelling of "Nim"
2020-11-11 22:22:02 +09:00
.github/workflows Update github actions 2020-11-07 06:31:24 +00:00
examples Add examples/basic readme 2020-08-30 11:52:15 +00:00
nimler Nimpretty 2020-09-05 11:08:53 +00:00
scripts Formatting per --stylecheck 2020-08-29 10:38:33 +00:00
tests Simplify .xnif. 2020-09-05 11:41:30 +00:00
.gitignore Export nimler main and codec separately 2020-04-05 14:22:47 +00:00
LICENSE Add license 2019-10-28 05:26:05 +00:00
nim.cfg Remove lto from tests nim.cfg 2020-09-05 07:34:56 +00:00
nimler.nim Simplify .xnif. 2020-09-05 11:41:30 +00:00
nimler.nimble Bump minor version 2020-09-06 15:31:08 +00:00
README.md Revises spelling of "Nim" 2020-11-11 12:39:30 +01:00
test_all.exs Add test_all elixir script 2020-04-16 00:30:44 +00:00

nimler

Nimler is a library for authoring Erlang and Elixir NIFs in the Nim programming language. It has mostly complete bindings for the Erlang NIF API and some accessories for making writing NIFs easier, including idiomatic functions for converting between Erlang terms and Nim types, and simplifications for using resource objects.

Mostly, Nimler is a minimal, zero-dependency wrapper for Erlang NIF API.

Build status

Target Status
x86_64-linux
arm64-linux
$ nimble install nimler

Documentation

Nimler is documented at smrz.dev/nimler.

Sample

import nimler

func add(env: ptr ErlNifEnv, a: int, b: int): (ErlAtom, int) {.xnif.} =
  (AtomOk, a + b)
  
func sub(env: ptr ErlNifEnv, a: int, b: int): (ErlAtom, int) {.xnif.} =
  (AtomOk, a - b)

exportNifs "Elixir.NifMath", [ add, sub ]