Rustler is a library for writing Erlang NIFs in safe Rust code. That means there should be no ways to crash the BEAM (Erlang VM). The library provides facilities for generating the boilerplate for interacting with the BEAM, handles encoding and decoding of Erlang terms, and catches rust panics before they unwind into C.
The library provides functionality for both Erlang and Elixir, however Elixir is favored as of now.
This crate provides the entire runtime library for rustler. Code generators are located in the rustler_codegen library.
There is a
:rustler package on hex.pm that provides
functionality which makes working with Rustler easier, including project generators, an
automatic NIF compiler for Mix, and utilities for loading the compiled NIF.
For more information about this, see the documentation for rustler_mix.