rustler 0.8.3

Safe Rust wrappers for creating Erlang NIF functions failed to build rustler-0.8.3
Please check the build logs and, if you believe this is' fault, open an issue.
Visit the last successful build: rustler-0.22.0-rc.0

Github Example

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.

Getting Started

Rustler has a Mix archive that provides several commands which makes working with Rustler easier, including project generators, a tool for validating your Rust and Erlang environment, as well as build utilities.

As long as you have Elixir and Mix installed, you can install the archive by doing mix archive.install When the archive is installed, you can generate a new Rustler project by doing mix <path>, and following the instructions.

Integrating with a mix project

For projects using mix, there is a helper package on hex, This package contains a mix compiler that automates environment sanity checks, crate compilation and nif loading. If you are using mix, this package is highly recommended, as it will probably make your life easier.

The primary feature of the rustler hex package is a mix compiler. The compiler takes care of compilation the nif crates of the project every time mix compile is run.