Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wltsmrz/nimler
Erlang/Elixir NIFs in Nim
https://github.com/wltsmrz/nimler
elixir erlang nif nim
Last synced: 28 days ago
JSON representation
Erlang/Elixir NIFs in Nim
- Host: GitHub
- URL: https://github.com/wltsmrz/nimler
- Owner: wltsmrz
- License: mit
- Created: 2019-10-09T08:16:24.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2021-11-06T04:30:14.000Z (about 3 years ago)
- Last Synced: 2024-08-04T01:20:55.206Z (4 months ago)
- Topics: elixir, erlang, nif, nim
- Language: Nim
- Homepage: https://smrz.dev/nimler
- Size: 1.7 MB
- Stars: 101
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- beamtoolbox - [erl
README
# 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 | ![](https://github.com/wltsmrz/nimler/workflows/build-x64/badge.svg) |
| arm64-linux | ![](https://github.com/wltsmrz/nimler/workflows/build-arm64/badge.svg) |```bash
$ nimble install nimler
```## Documentation
Nimler is documented at [smrz.dev/nimler](https://smrz.dev/nimler).
## Sample
```nim
import nimlerfunc 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 ]
```