NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #3278 most downloaded on crates.io
Safe Rust wrappers for creating Erlang NIF functions
Latest stable
0.39.0
Last release 1 months ago
12 Oct 2026
Ships fairly regularly
a new release about every 3 months
Some releases are documented
notes for 28 of 55 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
59 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Add Elixir 1.20 by @filmor in https://github.com/rusterlium/rustler/pull/744
From<&[u8]> for binary by @hauleth in https://github.com/rusterlium/rustler/pull/757Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.38.0...rustler-0.39.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
localPid (#756)From<&[u8]> for Binary (#757, thanks @hauleth)enif_set/is_pid_undefined (#748, thanks
@ldgabbay)panic = "unwind" at build time (#747)rustler::sys directly from the upstream header (#749)hash_internal to return u64 (#758, thanks @rkalios)ERL_NIF_TERM as newtype (#766)NewBinary for string encoding (#760)rustler::wrapper and the semi high-level it contained (#768)Drop deprecated codegen features by @filmor in https://github.com/rusterlium/rustler/pull/701
ResourceArc::as_c_arg() public by @lilioid in https://github.com/rusterlium/rustler/pull/736Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.4...rustler-0.38.0
Term::size on Erlang 29 = nif_version_2_18 (#731)from_iter to NewBinary (#704)nif_version_2_17 (#732)enif_* symbols to be passed
directly to work around Android's broken RTLD_GLOBAL (#733)deserialize_seq to deserialize binaries (#708)fix: gate ErlNifResourceTypeInit members/dyncall on nif_version_2_16 to fix OTP 22/23 heap overflow by @lmth in https://github.com/rusterlium/rustler/
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.3...rustler-0.37.4
Add missing inline and From for Term by @filmor in https://github.com/rusterlium/rustler/pull/719
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.2...rustler-0.37.3
From<Binary> for Term (#719)Bump MSRV to 1.91 by @filmor in https://github.com/rusterlium/rustler/pull/711
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.1...rustler-0.37.2
Binary::from_iolist creating an invalid Binary (#714, #715)CI Updates by @filmor in https://github.com/rusterlium/rustler/pull/697
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.36.2...rustler-0.37.0
staticlib feature to compile without nif_init and add {pkg}_nif_init
symbol (#688)IntoIterator to OwnedBinary (#702, thanks aDifferentJT)ErlNifEntry.min_erts to a placeholder value (#703)inline on commonly used functions (#475, thanks @joshuataylor)EnifAllocator available even if the allocator feature is not enabledReplace unsupported definition list syntax in README.md by @emig in https://github.com/rusterlium/rustler/pull/689
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.36.1...rustler-0.36.2
std::hash::Hash implementation for atoms (#695)rustler_mix (#696, thanks @dkuku)Only depend on libloading on non-Windows systems by @filmor in https://github.com/rusterlium/rustler/pull/677
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.36.0...rustler-0.36.1
No changes in the Rust code, only rustler_mix adjustments and dependency
updates.
:module_name) (#682).gitignore handling to match the new workspace stylelibloading on non-Windows systems (#677)Fix Nif* macros requiring an encoder by @filmor in https://github.com/rusterlium/rustler/pull/676
Nif* macros requiring an encoder by @filmor in https://github.com/rusterlium/rustler/pull/676Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.35.1...rustler-0.36.0
Cargo.toml file with mix rustler.new (#672)decode was requested (#676)Fix clippy lints by @filmor in https://github.com/rusterlium/rustler/pull/671
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.35.0...rustler-0.35.1
rustler_codegen (#671)Rustler macros to not produce warnings on Elixir 1.18 (#670)Fix register resource_impl arg and add name override by @filmor in https://github.com/rusterlium/rustler/pull/638
make_ref call by @filmor in https://github.com/rusterlium/rustler/pull/657Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.34.0...rustler-0.35.0
#[register_impl(name = "...")] (#638)Encoder and Decoder implementations for Box<T> (#644)Reference type and env.make_ref() function (#657)register attribute on #[register_impl] works as advertised
now (#638)rustler_sys as a separate library is merged into rustler::sys and will not
be released independently of rustler anymore (#653)Discover NIFs at startup by @filmor in https://github.com/rusterlium/rustler/pull/613
derive by @filmor in https://github.com/rusterlium/rustler/pull/621Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.33.0...rustler-0.34.0
rustler::resource! macro (#617, necessary due to a pending deprecation of a
Rust feature, #606)Resource trait
and provide a custom destructor function that is run before drop and
receives an Env parameter (#617)Resource::down callback (#617)on_load callback is now caught and leads to a panic (#617)rustler::init! is ignored (#613)derive feature flag is now ignored and its functionality unconditionally
enabled (#621)Drop deprecated functionality by @filmor in https://github.com/rusterlium/rustler/pull/604
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.32.1...rustler-0.33.0
PathBuf and Path) (#608).mix compile failing on path dependencies in the Rust library (#577, fixed in
#578 and #607)lazy_static in favour of std::sync::OnceLock. This change
raises the minimal supported Rust version to 1.70.Rustler.nif_versions function.rustler_export_nifs!, rustler::rustler_atoms! and
resource_struct_init! have been removed (#604). They had been deprecated
since version 0.22.0.Add Elixir 1.16 to pipeline by @filmor in https://github.com/rusterlium/rustler/pull/591
Env::is_process_alive and LocalPid::is_alive by @filmor in https://github.com/rusterlium/rustler/pull/599Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.31.0...rustler-0.32.1
.rev()Env::is_process_alive and LocalPid::is_alive (#599)num_bigint::BigInt using the big_integer feature (#601)serde support derived from serde_rustlerrustler_bigint is replaced by a feature flag and the wrapper is not
necessary anymore (#601)Yanked because it did not include all merged changes.
Yanked because it did not include all merged changes.
ci: Add Elixir v1.15 to the build matrix by @evnu in https://github.com/rusterlium/rustler/pull/571
NifStruct derive macro by @philss in https://github.com/rusterlium/rustler/pull/585Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.30.0...rustler-0.31.0
is_float and is_integer methods on terms (#581):rustler a compile-time-only dependency (#570)get_type work as documented for 0.30 (#581)impl Encoder on more functions (in particular on send) (#572)rustler_atoms_{struct_name_in_snakecase} to silence warnings (#585)initmacro in rustler-sys (v2.3.2, #589)Move deprecation warning to correct branch by @filmor in https://github.com/rusterlium/rustler/pull/564
module argument by @evnu in https://github.com/rusterlium/rustler/pull/560send variants to Env and OwnedEnv by @bcksl in https://github.com/rusterlium/rustler/pull/563Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.29.1...rustler-0.30.0
Result<(), SendError> from all send functions (#239, #563):rustler_crates project configurationuse Rustler module configuration as compile-time:rustler a compile-time-only dependency (#516, #559)enif_term_type to implement Term::get_type (#538). Please check the
UPGRADE documentation for necessary code changes.RUSTLER_NIF_VERSION, NIF version requirements have to be set via
features nowFix NifTaggedEnum derived Encoder impl for named-field variants by @dylanburati in https://github.com/rusterlium/rustler/pull/547
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.28.0...rustler-0.29.0
NifTaggedEnum derived Encoder impl for named-field variants (#547,
thanks @dylanburati)cfg! directives in build.rs causing cross-compilation to fail (#555,
thanks @fabriziosestito)Make rustler_sys forward compatible by @filmor in https://github.com/rusterlium/rustler/pull/536
ErlOption<T> by @tatsuya6502 in https://github.com/rusterlium/rustler/pull/507Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.28.0...rustler-0.29.0
ErlOption<T> to provide an ergonomic option type for Erlang (#507, thanks @tatsuya6502)RUSTLER_NIF_VERSIONSupport OTP 26 (#526, thanks @philss)
load_data_fun to compute load_data at runtime (#413, thanks @kaaboaye)load_data_fun to compute load_data at runtime (#413, thanks
@kaaboaye)MIX_ENV is no longer considered for determining the build profile. Now, the profile defaults to :release. Use the :mode option to pick another profile
MIX_ENV is no longer considered for determining the build profile. Now, the
profile defaults to :release. Use the :mode option to pick another
profile explicitly. (#496)ResourceArc::make_binary for safe use of enif_make_resource_binary (#487)OwnedBinary is now Sync (#493)load (#501, thanks @ishitatsuyuki)ResourceArc::make_binary for safe use of enif_make_resource_binary (#487)OwnedBinary is now Sync (#493)MIX_ENV is no longer considered for determining the build profile. Now, the
profile defaults to :release. Use the :mode option to pick another
profile explicitly. (#496)load (#501, thanks @ishitatsuyuki)Improve documentation of derive macros by @turion in https://github.com/rusterlium/rustler/pull/429
schedule flag for nif macro by @philss in https://github.com/rusterlium/rustler/pull/444Result alias by @SeokminHong in https://github.com/rusterlium/rustler/pull/448encode and decode by @SeokminHong in https://github.com/rusterlium/rustler/pull/466Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.25.0...rustler-0.26.0
We added TaggedEnum, which is a generalized enum type (#440, thanks to
@SeokminHong!). Example:
#[derive(NifTaggedEnum)]
pub enum TaggedEnum1 {
Named { x: i32, y: i32 },
String1(String),
String2(String),
Untagged,
}
On the Elixir side, the variants are represented as two-tuples {tag::atom(), inner::term()} | atom(), where the inner term is
Named in the example aboveString1 and String2 variantsThe Untagged variant is represented as the atom :untagged in Elixir.
Clone and Copy for TermType (#476, thanks @dvic)Env.whereis_pid() (#456, thanks @Qqwy)&[impl Encoder] for keys and values in map_from_arrays() to improve
ergonomics (#453, thanks @SeokminHong)rustler_codegen (#483, thanks @turion @SeokminHong and
@neosimsim)encode/decode in generated code (#466, thanks @SeokminHong)erlef/setup-beam (#457, thanks @SeokminHong)schedule flag for nif macro (#444)import NewBinary in lib by @ayrat555 in https://github.com/rusterlium/rustler/pull/436
Term::map_from_pairs by @philss in https://github.com/rusterlium/rustler/pull/437Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.24.0...rustler-0.25.0
NewBinary now also available as rustler::NewBinary (thanks @ayrat555)Term::map_from_pairs() to conveniently build a map from a list of pairs
(thanks @philss)RUSTLER_{}_field_{} variables
(renamed to rustler_{}_field_{})Change supported Elixir and OTP versions by @philss in https://github.com/rusterlium/rustler/pull/415
NewBinary (enif_make_new_binary) by @dlesl in https://github.com/rusterlium/rustler/pull/379Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.23.0...rustler-0.24.0
NewBinary type to create binaries in Rust without going through
OwnedBinary. This can improve performance. Thanks @dlesl!TermType derives Eq and PartialEq.rustler_mix: Bumped required toml dependency to 0.6rustler_sys dependency to ~2.2Define supported versions of OTP and Elixir by @evnu in https://github.com/rusterlium/rustler/pull/387
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.22.2...rustler-0.23.0
NifException for using Elixir exception structsBinary and OwnedBinarymix rustler.new with Elixir v1.13macosRange requires that :step equals 1. The :step field
was introduced with Elixir v1.12 and cannot be represented with Rust's
RangeInclusive.Don't call cargo when skip_compilation? is true by @karolsluszniak in https://github.com/rusterlium/rustler/pull/389
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.22.1...rustler-0.22.2
Rustler.Compiler.Config called into
cargo when skip_compilation? was set, breaking setups where cargo is not
installed. Fixed with #389, thanks @karolsluszniakReplace release.sh with prepare_release.sh by @evnu in https://github.com/rusterlium/rustler/pull/369
Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.22.0...rustler-0.22.1
@external_resources (#381)clippy: Allow breaking convention to avoid breaking change by @evnu in https://github.com/rusterlium/rustler/pull/366
init! macro by @scrogson in https://github.com/rusterlium/rustler/pull/255:rustler instead :rustler_mix by @BurntCaramel in https://github.com/rusterlium/rustler/pull/265{:error, <term>} by @elbow-jason in https://github.com/rusterlium/rustler/pull/252Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.21.2...rustler-0.22.0
Debug impl for rustler::ErrorNifTuple and NifRecordrustler::Error::Term encoding an arbitrary boxed encoder, returning
{:error, term}HashMap<T, U>, where T: Decoder and U: DecoderOwnedEnv::send_and_clearRenamed Pid to LocalPid to clarify that it can't point to a remote process
Dependencies have been updated.
Derive macros have been refactored.
Macros have been renamed and old ones have been deprecated:
rustler_export_nifs! is now rustler::init!rustler_atoms! is now rustler::atoms!resource_struct_init! is now rustler::resource!New rustler::atoms! macro removed the atom prefix from the name:
//
// Before
//
rustler::rustler_atoms! {
atom ok;
atom error;
atom renamed_atom = "Renamed";
}
//
// After
//
rustler::atoms! {
ok,
error,
renamed_atom = "Renamed",
}
NIF functions can be initialized with a simplified syntax:
//
// Before
//
rustler::rustler_export_nifs! {
"Elixir.Math",
[
("add", 2, add)
],
None
}
//
// After
//
rustler::init!("Elixir.Math", [add]);
NIFs can be derived from regular functions, if the arguments implement
Decoder and the return type implements Encoder:
//
// Before
//
fn add<'a>(env: Env<'a>, args: &[Term<'a>]) -> Result<Term<'a>, Error> {
let num1: i64 = args[0].decode()?;
let num2: i64 = args[1].decode()?;
Ok((atoms::ok(), num1 + num2).encode(env))
}
//
// After
//
#[rustler::nif]
fn add(a: i64, b: i64) -> i64 {
a + b
}
rustler::nif exposes more options to configure a NIF were the NIF is
defined:
#[rustler::nif(schedule = "DirtyCpu")]
pub fn dirty_cpu() -> Atom {
let duration = Duration::from_millis(100);
std::thread::sleep(duration);
atoms::ok()
}
#[rustler::nif(name = "my_add")]
fn add(a: i64, b: i64) -> i64 {
a + b
}
The rustler compiler has been deprecated and will be removed with v1.0. NIFs
are no longer defined in mix.exs, but are configured with use Rustler. See
the documentation for the Rustler module. To migrate to the new
configuration:
Drop :rustler from the :compilers key in your mix.exs project/0
function
Drop :rustler_crates from project/0 and move the configurations into the
use Rustler of your NIF module or application config:
# config/dev.exs
config :my_app, MyApp.Native,
mode: :debug
For more information, see the documentation.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
rustler_codegen is now reexported by the rustler crate. Depending on the rustler_codegen crate is deprecated.
Term::decode_as_binary.rustler_codegen is now reexported by the rustler crate. Depending on the rustler_codegen crate is deprecated.erlang_nif-sys has been renamed to rustler_sys and vendored into the rustler repo.rustler_mix with the toml-elixir package.bool now corresponds only to booleans (false, true) in Elixir. Previously, nil and false were both decodable to
bool. To use the previous behaviour, a Truthy newtype was introduced.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.