{"repo":"rusterlium/rustler","free":true,"listed":false,"github":"https://github.com/rusterlium/rustler","clone":"git clone https://github.com/rusterlium/rustler.git","description":"Safe Rust bridge for creating Erlang NIF functions","language":"Rust","stars":4848,"topics":["erlang","nif","elixir","ffi","binding","rust"],"license":"Apache-2.0","category":"saas-starters-boilerplates","readme_excerpt":"Rustler Documentation Getting Started 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. Features Safety The code you write in a Rust NIF should never be able to crash the BEAM. Interop Decoding and encoding rust values into Erlang terms is as easy as a function call. Type composition Making a Rust struct encodable and decodable to Erlang or Elixir can be done with a single attribute. Resource objects Enables you to safely pass a reference to a Rust struct into Erlang code. The struct will be automatically dropped when it's no longer referenced. Getting started The easiest way of getting started is the rustler Elixir library. - Add the rustler Elixir library as a dependency of your project. - Run mix rustler.new to generate a new NIF in your project. Follow the instructions. - If you are already using serde and/or have been using serde rustler before, please enable the serde feature in your NIF crate's Cargo.toml on the rustler dependency. What it looks like This is the code for a minimal NIF that adds two numbers and returns the result. Minimal Supported Rust Version (MSRV) Rustler currently has a minim","default_branch":null,"files":null,"tree":[],"storefront":"/r/rusterlium","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rusterlium/rustler/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}