# rusterlium/rustler

Safe Rust bridge for creating Erlang NIF functions

Repository: https://github.com/rusterlium/rustler
Canonical: https://ross.abutalabs.com/products/rustler
Homepage: https://docs.rs/crate/rustler
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: erlang, nif, elixir, ffi, binding, rust
Last push: 2026-08-26T22:27:20+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 73, longevity 100
- inputs: {"age_days": 4033, "days_push": 7, "days_rel": 100, "gap_med": 73.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4857, forks 246 (observed 2026-08-28T04:09:01.482230+00:00)

## What it is
Rustler is a Rust library for writing safe Erlang NIFs (Native Implemented Functions) that run inside the BEAM VM without risking crashes. It provides boilerplate generation, encoding/decoding of Erlang terms, panic catching, and resource objects for both Erlang and Elixir.

## Use cases
- write erlang nifs in rust
- call rust code from elixir
- speed up elixir with native functions
- encode rust structs to erlang terms
- pass rust resources into erlang code safely
- avoid crashing the beam vm with native code

## When to choose
- you need native performance in an Erlang or Elixir application
- you want memory-safe FFI into the BEAM without segfaults
- you want ergonomic Rust-to-Elixir bindings with derive macros

## When to avoid
- you need a pure Rust or pure Elixir solution without FFI
- you target platforms or OTP versions outside the supported range
- you need long-running NIFs that block BEAM schedulers (consider dirty schedulers or ports)

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: developer-tools, programming-languages, backend
- platform: rust, windows, cross-platform
- tags: erlang, elixir, nif, ffi, beam, interop, linux, macos

## Member repositories
- rusterlium/rustler (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:01.482230+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:18:22.882798+00:00, confidence not recorded.
  - readme: https://github.com/rusterlium/rustler (fetched 2026-08-28T04:09:01.482230+00:00, sha 7e5f05f4b3c5)
  - homepage: https://docs.rs/crate/rustler (fetched 2026-08-29T09:01:04.082065+00:00, sha feaf4cefbf95)
  - site_page: https://docs.rs/ (fetched 2026-08-29T09:01:04.091677+00:00, sha f2f97f9f98fe)
  - site_page: https://docs.rs/crate/rustler/latest/features (fetched 2026-08-29T09:01:04.093524+00:00, sha 3d1f8f0bc008)
  - site_page: https://docs.rs/about (fetched 2026-08-29T09:01:04.095105+00:00, sha 29ab7986fbf5)
  - site_page: https://docs.rs/about/badges (fetched 2026-08-29T09:01:04.101765+00:00, sha 6588cac258af)
  - site_page: https://docs.rs/about/builds (fetched 2026-08-29T09:01:04.103383+00:00, sha 811231ca4680)
  - site_page: https://docs.rs/about/metadata (fetched 2026-08-29T09:01:04.105264+00:00, sha 0dcdccb2b2b2)
  - site_page: https://docs.rs/about/redirections (fetched 2026-08-29T09:01:04.107312+00:00, sha 1b1efd93105f)
  - site_page: https://docs.rs/about/download (fetched 2026-08-29T09:01:04.108833+00:00, sha 6793b0ab6541)
- Data as of 2026-08-30T08:39:29.467469+00:00.
