rusterlium/rustler
60.6
Adequate · 14 November 2026
26.2k
lines of production code
Rust
with C
5
measurements over time
What this system is
Features
Add NifRecord benchmark to compare against NifStruct
The benchmarking infrastructure in \rustler\_benchmarks/native/benchmark\ now includes a new \nif\_record\ module that defines a \MyRecord\ struct (tagged "my\_record") with 26 integer fields. This allows users to benchmark the performance of NifRecord encoding/decoding against the existing NifStruct implementation, alongside other miscellaneous term benchmarks provided in \nif\_various\.
_rustler\benchmarks/native/benchmark · high confidence
Add project scaffolding and integration test for rustler\_mix
The rustler\_mix package now includes a .formatter.exs for consistent code formatting, a .gitignore to exclude build artifacts, and an updated README.md that documents installation and usage with the :rustler dependency. Additionally, a test.sh script has been added to verify that the mix task correctly generates a working NIF project, compiles it, and ensures the generated code functions correctly in both development and release environments.
_rustler\mix · high confidence
Added JSON serialization benchmarks for serde\_rustler
A new benchmark suite has been added to the \rustler\_tests/benchmarks\ directory to evaluate the performance of \serde\_rustler\ against other Elixir JSON libraries. The \serde.exs\ script uses Benchee to measure encode, decode, and transcode speeds for libraries including Poison, Jason, JSX, Tiny, jsone, jiffy, and JSON, providing users with comparative performance data.
_rustler\tests/benchmarks · high confidence
Added Rustler benchmarking infrastructure
A new \rustler\_benchmarks\ project has been added to provide performance comparisons for Rustler features. It includes benchmarks for NifStruct and NifRecord decoding/encoding, as well as various other NIF operations like atom handling and term decoding. The benchmarks are compiled in release mode and can be executed via \mix run\ to compare performance metrics.
_rustler\benchmarks · high confidence
Added binary\_example native crate
A new Rust binary example has been added to the rustler\_tests suite. This crate serves as a basic demonstration of a native Rust application, currently printing a simple message to the console upon execution.
_rustler\_tests/native/binary\example · high confidence
Initial import of serde\_rustler test suite
Added the \serde\_rustler\ test module to \rustler\_tests\, introducing Elixir wrappers for NIF-based serialization and deserialization tests. This includes JSON encoding/decoding functions, a \readme\ example demonstrating round-tripping of an \Animal\ struct using NIF-defined type hints, and a \transcode\ function for transcoding via \serde-transcode\.
_rustler\tests/lib/serde · high confidence
Initial project structure and license files
The repository is initialized with the standard project scaffolding for Rustler, including the Apache-2.0 and MIT dual licenses, a comprehensive .gitignore, a .formatter.exs configuration for Elixir subdirectories, and documentation files (README, CHANGELOG, UPGRADE). This commit also removes the legacy C-based build system (Makefile, nifconf\_gen.c) and the initial raw Rust API bindings (erlnif.rs, nif\_init.rs), signaling a shift toward a modern Cargo-based workspace structure.
(repo-wide) · high confidence
Introduce Rustler compile-time configuration macro
Adds the \Rustler\ module, providing a \use Rustler\ macro that enables compile-time configuration for NIF modules. Users can now specify options such as \:otp\_app\, \:crate\, \:load\_data\, and \:load\_data\_fun\ to control how the Rust crate is compiled and how the NIF library is loaded at runtime, including support for dynamic load data generation via a function tuple.
_rustler\mix/lib · high confidence
New OTP header code generator for Rustler NIF bindings
The rustler crate now includes a code generator (\otp\_headers/codegen\) that parses Erlang NIF C headers and produces Rust bindings. This tool supports two emission modes: a 'Main' mode that generates a callback table filled at runtime (e.g., via \dlsym\), and a 'Direct' mode that links directly against NIF API symbols. The generator handles API signature fixes, variadic functions, and type rendering, enabling more robust and maintainable integration with the Erlang/OTP NIF interface.
rustler · high confidence
New \`mix rustler.new\` task for generating Rustler projects
Adds the \mix rustler.new\ Mix task, which generates boilerplate for a new Rustler project. Users can now create a project by running \mix rustler.new\, optionally specifying the Elixir module name, Rust crate name, and OTP application via command-line flags (\--module\, \--name\, \--otp-app\). The task generates the necessary Elixir and Rust files, including a \Cargo.toml\ and \src/lib.rs\, and automatically updates the \.gitignore\ file to exclude the \target/\ directory if it does not already exist.
_rustler\mix/lib/mix · high confidence
Architecture
Rustler codegen restructured around a shared Context and template system
The \rustler\_codegen\ crate has been refactored to use a centralized \Context\ struct for parsing derive inputs and a shared \encode\_decode\_templates\ module for generating \Encoder\ and \Decoder\ implementations. This change standardizes how all derive macros (such as \NifStruct\, \NifMap\, \NifRecord\, \NifTuple\, and \NifTaggedEnum\) generate code, ensuring consistent handling of lifetimes, generic type parameters, and atom module naming across the library.
_rustler\codegen · high confidence
Behavioural changes
1 commit (0 fixes) modifying rustler\_mix
A change to existing behaviour in rustler\_mix — 1 commit, 2 files: “Skip a crate's target directory before walking external resources (\#788)” (refs \#788). Also in this area: Added test helper for Rustler Mix.
_rustler\mix/test · medium confidence · unverified
Refactored compiler configuration and error handling
The compiler logic has been restructured to use a dedicated configuration struct (Rustler.Compiler.Config) that centralizes build settings such as cargo path, features, and environment variables, while replacing the previous TOML-based metadata retrieval with direct cargo metadata calls. Additionally, a new error messaging module (Rustler.Compiler.Messages) provides specific, user-friendly diagnostics for common build failures, including missing rustup, unsupported Rustler versions, and missing build artifacts.
_rustler\mix/lib/rustler/compiler · high confidence
Rewrite Rust NIF and binary compilation with new build artifact handling
The Rustler build process has been rewritten to support compiling both NIF libraries and standalone Rust binaries. A new compiler module now invokes Cargo directly, parsing JSON output to identify build artifacts and correctly copy them to the project's private directory, including handling platform-specific file extensions. The previous custom TOML parser has been removed, and the system now relies on standard tooling to manage build configurations and artifact detection.
_rustler\mix/lib/rustler · high confidence
Updated \`mix rustler.new\` templates to use Rust 2021 and workspace structure
The templates generated by \mix rustler.new\ have been updated to use the Rust 2021 edition and a Cargo workspace structure. New projects now include a root \Cargo.toml\ defining a workspace that points to a \native/\<library\_name\>\ directory, and the library template itself targets the 2021 edition. Additionally, the generated README documentation has been refreshed to reflect these structural changes and uses \:erlang.nif\_error/1\ for the placeholder NIF implementation.
_rustler\mix/priv · high confidence
Updated basic NIF template to use modern Rustler syntax
The basic NIF template has been updated to use the modern \\#\[rustler::nif\]\ attribute macro and the \rustler::init!\ macro, replacing older procedural macro patterns. This change ensures that new projects generated from this template adhere to current Rustler conventions and syntax requirements.
_rustler\mix/priv/templates/basic · high confidence
Test coverage
Add Elixir test wrapper modules for Rustler NIFs; Add Rustler NIF tests for BigInt arithmetic; Add dynamic load test for NIF initialization; Add serde\_rustler NIF test suite with JSON encoding/decoding; Added compile-time tests for Rustler NIF type lifetimes; Initial test suite for Rustler NIFs; Introduce Rustler test suite with comprehensive NIF coverage.
Dependencies
Rustler 0.38.0 release with Rust 1.91 MSRV and syn 3.0 upgrade
This update introduces Rustler version 0.38.0, raising the Minimum Supported Rust Version (MSRV) to 1.91 and upgrading the \syn\ dependency to version 3.0. The release also adds support for Erlang/OTP 29 via the new \nif\_version\_2\_18\ feature flag, updates the \rustler\_codegen\ proc-macro crate to match the main library version, and configures the workspace to use the Cargo v2 resolver.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 63 → 61 (-2.5)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 97 → 89 (-7.9)
- Architecture 81 → 81 (+0.0)
- Maturity 52 → 53 (+0.7)
- Readiness 62 → 60 (-1.5)
- Security 77 → 61 (-15.5)
- Performance 95 → 95 (+0.0)
Resolved (5)
- Duplicated block (11 lines × 2) (rustler_codegen/src/ex_struct.rs)
- Duplicated block (11 lines × 5) (rustler_codegen/src/ex_struct.rs)
- Duplicated block (13 lines × 4) (rustler_codegen/src/ex_struct.rs)
- No ADRs found
- Off-boarding risk: anonymized user #1
New (29)
- Duplicated block (11 lines × 2) (rustler_codegen/src/ex_struct.rs)
- Duplicated block (11 lines × 5) (rustler_codegen/src/ex_struct.rs)
- Duplicated block (13 lines × 4) (rustler_codegen/src/ex_struct.rs)
- Edited copies of one member (3 members, 1+ corresponding lines) (rustler_tests/native/rustler_test/src/test_atom.rs)
- Edited copies of one member (4 members, 8+ corresponding lines) (rustler/src/types/map.rs)
- Edited copy of a member (10 corresponding lines) (rustler/src/serde/de.rs)
- Edited copy of a member (10 corresponding lines) (rustler/src/types/map.rs)
- Edited copy of a member (12 corresponding lines) (rustler/src/types/binary.rs)
- Edited copy of a member (12 corresponding lines) (rustler_codegen/src/context.rs)
- Edited copy of a member (12 corresponding lines) (rustler_codegen/src/lib.rs)
- Edited copy of a member (13 corresponding lines) (rustler/src/types/map.rs)
- Edited copy of a member (13 corresponding lines) (rustler_tests/native/rustler_test/src/test_map.rs)
- Edited copy of a member (15 corresponding lines) (rustler/src/resource/registration.rs)
- Edited copy of a member (15 corresponding lines) (rustler_tests/native/rustler_serde_test/src/test.rs)
- Edited copy of a member (16 corresponding lines) (rustler/src/types/atom.rs)
- Edited copy of a member (21 corresponding lines) (rustler/src/types/atom.rs)
- Edited copy of a member (27 corresponding lines) (rustler_codegen/src/unit_enum.rs)
- Edited copy of a member (30 corresponding lines) (rustler_codegen/src/record.rs)
- Edited copy of a member (5 corresponding lines) (rustler/src/types/atom.rs)
- Edited copy of a member (55 corresponding lines) (rustler_codegen/src/ex_struct.rs)
- …and 9 more
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- (root) — 1 commit
Notable commits
- change: Skip a crate's target directory before walking external resources (#788)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
rusterlium/rustler was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 78c940d99466ad67c8e3cd1357768205a0022efc — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.