Elixir simplabs.com

Writing Rust NIFs for Elixir with Rustler  ↦

A Native Implemented Function is implemented in C (or Rust when using Rustler) and can be called from Elixir or Erlang just like any other function. It’s the simplest and fastest way to run native code from Erlang but it does come with a caveat: a crash in a NIF can bring down the whole BEAM. This makes Rust a safer option than C for implementing NIFs as its type system and ownership model guarantee memory and thread-safety.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00