rusterlium/rustler
Safe Rust bridge for creating Erlang NIF functions
📋 What's Changed
- Bump action versions and add OTP29 support by @filmor in https://github.com/rusterlium/rustler/pull/730
- Add OTP-29 enif functions by @filmor in https://github.com/rusterlium/rustler/pull/731
- Drop deprecated codegen features by @filmor in https://github.com/rusterlium/rustler/pull/701
- Add from_iter to NewBinary by @aDifferentJT in https://github.com/rusterlium/rustler/pull/704
- Implement UTF8 atom support on NIF 2.17 by @filmor in https://github.com/rusterlium/rustler/pull/732
- Alternative NIF Filler adjustment for Android by @filmor in https://github.com/rusterlium/rustler/pull/733
- Make `ResourceArc::as_c_arg()` public by @lilioid in https://github.com/rusterlium/rustler/pull/736
- Relax mutability requirement of ResourceArc::as_c_arg() by @lilioid in https://github.com/rusterlium/rustler/pull/741
- + 4 more
✨ New Contributors
- @lilioid made their first contribution in https://github.com/rusterlium/rustler/pull/736
- @dannote made their first contribution in https://github.com/rusterlium/rustler/pull/729
- @murisi made their first contribution in https://github.com/rusterlium/rustler/pull/708
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.4...rustler-0.38.0
📋 What's Changed
- 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/pull/725
✨ New Contributors
- @lmth made their first contribution in https://github.com/rusterlium/rustler/pull/725
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.3...rustler-0.37.4
📋 What's Changed
- Add missing inline and From<Binary> for Term by @filmor in https://github.com/rusterlium/rustler/pull/719
- Add message for :no_artifacts by @chgeuer in https://github.com/rusterlium/rustler/pull/721
✨ New Contributors
- @chgeuer made their first contribution in https://github.com/rusterlium/rustler/pull/721
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.2...rustler-0.37.3
📋 What's Changed
- Bump MSRV to 1.91 by @filmor in https://github.com/rusterlium/rustler/pull/711
- Update libloading requirement from 0.8 to 0.9 by @dependabot[bot] in https://github.com/rusterlium/rustler/pull/710
- Update CI to use current versions of OTP and Elixir by @filmor in https://github.com/rusterlium/rustler/pull/713
- Fix iolist inspect by @filmor in https://github.com/rusterlium/rustler/pull/715
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.1...rustler-0.37.2
📋 What's Changed
- Fix missing chdir when building by @filmor in https://github.com/rusterlium/rustler/pull/706
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.37.0...rustler-0.37.1
📋 What's Changed
- CI Updates by @filmor in https://github.com/rusterlium/rustler/pull/697
- Build refactor by @filmor in https://github.com/rusterlium/rustler/pull/691
- Static NIFs by @filmor in https://github.com/rusterlium/rustler/pull/688
- Add inline tags to commonly used functions by @joshuataylor in https://github.com/rusterlium/rustler/pull/475
- Add IntoIterator to OwnedBinary by @aDifferentJT in https://github.com/rusterlium/rustler/pull/702
- Add required min_erts field by @filmor in https://github.com/rusterlium/rustler/pull/703
✨ New Contributors
- @joshuataylor made their first contribution in https://github.com/rusterlium/rustler/pull/475
- @aDifferentJT made their first contribution in https://github.com/rusterlium/rustler/pull/702
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.36.2...rustler-0.37.0
📋 What's Changed
- Replace unsupported definition list syntax in README.md by @emig in https://github.com/rusterlium/rustler/pull/689
- Implement Hash for atoms by @filmor in https://github.com/rusterlium/rustler/pull/695
- 1.19 typing_violation_error by @dkuku in https://github.com/rusterlium/rustler/pull/696
✨ New Contributors
- @emig made their first contribution in https://github.com/rusterlium/rustler/pull/689
- @dkuku made their first contribution in https://github.com/rusterlium/rustler/pull/696
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.36.1...rustler-0.36.2
📋 What's Changed
- Only depend on libloading on non-Windows systems by @filmor in https://github.com/rusterlium/rustler/pull/677
- Fixes for rustler_mix by @filmor in https://github.com/rusterlium/rustler/pull/682
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.36.0...rustler-0.36.1
📋 What's Changed
- Fix `Nif*` macros requiring an encoder by @filmor in https://github.com/rusterlium/rustler/pull/676
- Add workspace and remove linkage override from 'mix rustler.new' templates by @filmor in https://github.com/rusterlium/rustler/pull/672
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.35.1...rustler-0.36.0
📋 What's Changed
- Fix clippy lints by @filmor in https://github.com/rusterlium/rustler/pull/671
- Elixir 1.18 tweaks and CI by @filmor in https://github.com/rusterlium/rustler/pull/670
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.35.0...rustler-0.35.1
📋 What's Changed
- Fix register resource_impl arg and add name override by @filmor in https://github.com/rusterlium/rustler/pull/638
- Serde: Restrict special ok/error handling to variant names by @benhaney in https://github.com/rusterlium/rustler/pull/639
- Allow floats to decode from integer terms by @benhaney in https://github.com/rusterlium/rustler/pull/641
- Fix Windows API functions by @filmor in https://github.com/rusterlium/rustler/pull/643
- Add unsafe dyncall support by @filmor in https://github.com/rusterlium/rustler/pull/635
- Implement Encoder and Decoder for Box<T> by @dvic in https://github.com/rusterlium/rustler/pull/644
- Dynamic symbols on Unix by @filmor in https://github.com/rusterlium/rustler/pull/650
- Revert "Recompile if the NIF library is changed/deleted" by @filmor in https://github.com/rusterlium/rustler/pull/654
- + 4 more
✨ New Contributors
- @benhaney made their first contribution in https://github.com/rusterlium/rustler/pull/639
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.34.0...rustler-0.35.0
📋 What's Changed
- Discover NIFs at startup by @filmor in https://github.com/rusterlium/rustler/pull/613
- Unconditionally enable `derive` by @filmor in https://github.com/rusterlium/rustler/pull/621
- Retrieve newest Rustler version from crates.io by @filmor in https://github.com/rusterlium/rustler/pull/623
- Recompile if the NIF library is changed/deleted by @filmor in https://github.com/rusterlium/rustler/pull/624
- Refactor Resources by @filmor in https://github.com/rusterlium/rustler/pull/617
- Add Erlang 27 and Elixir 1.17 to CI by @filmor in https://github.com/rusterlium/rustler/pull/630
- Resource attribute macro by @filmor in https://github.com/rusterlium/rustler/pull/627
- Remove redundant import by @filmor in https://github.com/rusterlium/rustler/pull/633
- + 2 more
📋 What's Changed
- Add additional benchmarks by @cleaton in https://github.com/rusterlium/rustler/pull/565
- Update README.md by @dvic in https://github.com/rusterlium/rustler/pull/605
- Drop deprecated functionality by @filmor in https://github.com/rusterlium/rustler/pull/604
- Drop lazy_static in favour of std::sync::OnceLock by @filmor in https://github.com/rusterlium/rustler/pull/609
- Implement simple allocator using enif_{alloc,free} by @filmor in https://github.com/rusterlium/rustler/pull/580
- Add simple justfile by @filmor in https://github.com/rusterlium/rustler/pull/610
- Implement support for conversions of paths by @filmor in https://github.com/rusterlium/rustler/pull/608
- feature: compare local pids by @hengermax in https://github.com/rusterlium/rustler/pull/611
- + 1 more
✨ New Contributors
- @hengermax made their first contribution in https://github.com/rusterlium/rustler/pull/611
- @flupke made their first contribution in https://github.com/rusterlium/rustler/pull/607
- @grzuy made an equivalent contribution in https://github.com/rusterlium/rustler/pull/578
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.32.1...rustler-0.33.0
📋 What's Changed
- Add Elixir 1.16 to pipeline by @filmor in https://github.com/rusterlium/rustler/pull/591
- Fix type usage to use the real C types wherever applicable by @filmor in https://github.com/rusterlium/rustler/pull/592
- Allow arbitrary function names by @filmor in https://github.com/rusterlium/rustler/pull/593
- Add reverse map iteration by @devsnek in https://github.com/rusterlium/rustler/pull/596
- Add `Env::is_process_alive` and `LocalPid::is_alive` by @filmor in https://github.com/rusterlium/rustler/pull/599
- Implement Decoder/Encoder support for i/u128 by @filmor in https://github.com/rusterlium/rustler/pull/600
- Replace rustler_bigint by a feature flag on rustler by @filmor in https://github.com/rusterlium/rustler/pull/601
- Update heck requirement from 0.4 to 0.5 by @dependabot in https://github.com/rusterlium/rustler/pull/602
- + 1 more
✨ New Contributors
- @devsnek made their first contribution in https://github.com/rusterlium/rustler/pull/596
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.31.0...rustler-0.32.1
📋 What's Changed
- ci: Add Elixir v1.15 to the build matrix by @evnu in https://github.com/rusterlium/rustler/pull/571
- Expand load data at compile time by @evnu in https://github.com/rusterlium/rustler/pull/570
- Fix warnings for non-snake case atom module names by @bcksl in https://github.com/rusterlium/rustler/pull/573
- Fix error messages by @turion in https://github.com/rusterlium/rustler/pull/579
- Add support for generic types by @turion in https://github.com/rusterlium/rustler/pull/574
- Fix rustler_sys tests on 64bit ARM by @filmor in https://github.com/rusterlium/rustler/pull/584
- Fix issues with nightly Rust by @filmor in https://github.com/rusterlium/rustler/pull/589
- Fix Term's "get_type()" implementation by @philss in https://github.com/rusterlium/rustler/pull/581
- + 4 more
📋 What's Changed
- Drop support for RUSTLER_NIF_VERSION by @filmor in https://github.com/rusterlium/rustler/pull/546
- Exclude directories from external resources to be compatible with Elixir 1.15 by @adrienmo in https://github.com/rusterlium/rustler/pull/548
- Fix NifTaggedEnum derived Encoder impl for named-field variants by @dylanburati in https://github.com/rusterlium/rustler/pull/547
- Remove cfg! directives in build.rs causing cross-compilation to fail by @fabriziosestito in https://github.com/rusterlium/rustler/pull/555
- Use compile_env for compile-time configuration by @josevalim in https://github.com/rusterlium/rustler/pull/550
- Remove superfluous `module` argument by @evnu in https://github.com/rusterlium/rustler/pull/560
- Term Type by @filmor in https://github.com/rusterlium/rustler/pull/538
- Fix clippy lints by @filmor in https://github.com/rusterlium/rustler/pull/561
- + 4 more
✨ New Contributors
- @adrienmo made their first contribution in https://github.com/rusterlium/rustler/pull/548
- @dylanburati made their first contribution in https://github.com/rusterlium/rustler/pull/547
- @fabriziosestito made their first contribution in https://github.com/rusterlium/rustler/pull/555
- @bcksl made their first contribution in https://github.com/rusterlium/rustler/pull/563
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.29.1...rustler-0.30.0
📋 What's Changed
- Fix NifTaggedEnum derived Encoder impl for named-field variants by @dylanburati in https://github.com/rusterlium/rustler/pull/547
- Exclude directories from external resources to be compatible with Elixir 1.15 by @adrienmo in https://github.com/rusterlium/rustler/pull/548
- Remove cfg! directives in build.rs causing cross-compilation to fail by @fabriziosestito in https://github.com/rusterlium/rustler/pull/555
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.28.0...rustler-0.29.0
📋 What's Changed
- Make rustler_sys forward compatible by @filmor in https://github.com/rusterlium/rustler/pull/536
- Add OTP26 to CI and bump rustler_sys by @filmor in https://github.com/rusterlium/rustler/pull/539
- Introduce CI cache by @filmor in https://github.com/rusterlium/rustler/pull/541
- Drop OTP23 entirely from CI and use -latest for all OS versions by @filmor in https://github.com/rusterlium/rustler/pull/542
- Use features for minimal NIF version by @filmor in https://github.com/rusterlium/rustler/pull/537
- Apply current NIF version for tests and raise default by @filmor in https://github.com/rusterlium/rustler/pull/543
- rustler: add a Rust type `ErlOption<T>` by @tatsuya6502 in https://github.com/rusterlium/rustler/pull/507
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.28.0...rustler-0.29.0
✨ Added
- Support OTP 26 (#526, thanks @philss)
- Support tuples in NIF macro (#520, #527, thanks @denumerate and @philss)
- Supportfor `load_data_fun` to compute `load_data` at runtime (#413, thanks @kaaboaye)
📋 Changed
- Enhanced NIF macro error messages for invalid attributes (#525, thanks @philss)
💥 BREAKING
- `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)
✨ Added
- `ResourceArc::make_binary` for safe use of `enif_make_resource_binary` (#487)
- `OwnedBinary` is now `Sync` (#493)
- Specified MSRV to be 1.56.1.
🐛 Fixed
- Documentation for `load` (#501, thanks @ishitatsuyuki)
📋 Changed
- Edition 2021 for the rustler mix template (#512, thanks @ayrat555)
📋 What's Changed
- Improve documentation of derive macros by @turion in https://github.com/rusterlium/rustler/pull/429
- Document the usage of `schedule` flag for `nif` macro by @philss in https://github.com/rusterlium/rustler/pull/444
- Update links in the docs and bump ex_doc by @philss in https://github.com/rusterlium/rustler/pull/445
- Fix compilation error of `Result` alias by @SeokminHong in https://github.com/rusterlium/rustler/pull/448
- Support more generalized macro for enum by @SeokminHong in https://github.com/rusterlium/rustler/pull/440
- ci: Test OTP 25 and remove OTP 22 by @evnu in https://github.com/rusterlium/rustler/pull/455
- Change map helper functions' arguments by @SeokminHong in https://github.com/rusterlium/rustler/pull/453
- Migrate GitHub Actions to erlef/setup-beam by @kianmeng in https://github.com/rusterlium/rustler/pull/457
- + 9 more
✨ New Contributors
- @turion made their first contribution in https://github.com/rusterlium/rustler/pull/429
- @SeokminHong made their first contribution in https://github.com/rusterlium/rustler/pull/448
- @Qqwy made their first contribution in https://github.com/rusterlium/rustler/pull/456
- @dvic made their first contribution in https://github.com/rusterlium/rustler/pull/476
- @cleaton made their first contribution in https://github.com/rusterlium/rustler/pull/482
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.25.0...rustler-0.26.0
📋 What's Changed
- import NewBinary in lib by @ayrat555 in https://github.com/rusterlium/rustler/pull/436
- Add `Term::map_from_pairs` by @philss in https://github.com/rusterlium/rustler/pull/437
- Fix macos target in warning by @evnu in https://github.com/rusterlium/rustler/pull/438
- Abort compilation on macos if linker arguments are missing by @evnu in https://github.com/rusterlium/rustler/pull/439
- ci: Add macos runner by @evnu in https://github.com/rusterlium/rustler/pull/401
- Fix snake case warnings for rust analyzer by @philss in https://github.com/rusterlium/rustler/pull/441
- Fix year in changelog entry by @sickill in https://github.com/rusterlium/rustler/pull/442
✨ New Contributors
- @ayrat555 made their first contribution in https://github.com/rusterlium/rustler/pull/436
- @sickill made their first contribution in https://github.com/rusterlium/rustler/pull/442
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.24.0...rustler-0.25.0
📋 What's Changed
- Change supported Elixir and OTP versions by @philss in https://github.com/rusterlium/rustler/pull/415
- Fix typos by @kianmeng in https://github.com/rusterlium/rustler/pull/420
- Remove superfluous 'extern crate' by @evnu in https://github.com/rusterlium/rustler/pull/422
- Bump heck to 0.4 by @evnu in https://github.com/rusterlium/rustler/pull/421
- Relax Jason version requirement to ~> 1.0 by @aj-foster in https://github.com/rusterlium/rustler/pull/427
- file extensions should be set based on the compile target by @cocoa-xu in https://github.com/rusterlium/rustler/pull/423
- add `NewBinary` (`enif_make_new_binary`) by @dlesl in https://github.com/rusterlium/rustler/pull/379
- Make TermType derive Eq and PartialEq by @hammsvietro in https://github.com/rusterlium/rustler/pull/432
- + 1 more
✨ New Contributors
- @aj-foster made their first contribution in https://github.com/rusterlium/rustler/pull/427
- @cocoa-xu made their first contribution in https://github.com/rusterlium/rustler/pull/423
- @hammsvietro made their first contribution in https://github.com/rusterlium/rustler/pull/432
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.23.0...rustler-0.24.0
📋 What's Changed
- Define supported versions of OTP and Elixir by @evnu in https://github.com/rusterlium/rustler/pull/387
- Remove DUMMY variant from ErlNifCharEncoding by @evnu in https://github.com/rusterlium/rustler/pull/390
- codegen: change RaiseAtom to RaiseTerm by @dlesl in https://github.com/rusterlium/rustler/pull/378
- Crash if metadata cannot be retrieved by @evnu in https://github.com/rusterlium/rustler/pull/398
- Remove remaning code from unsupported NIF versions by @philss in https://github.com/rusterlium/rustler/pull/395
- cargo config for all macos architectures by @scrogson in https://github.com/rusterlium/rustler/pull/396
- Add NifException macro by @thomas9911 in https://github.com/rusterlium/rustler/pull/383
- Require step for range by @evnu in https://github.com/rusterlium/rustler/pull/399
- + 9 more
✨ New Contributors
- @madninja made their first contribution in https://github.com/rusterlium/rustler/pull/404
- @hazardfn made their first contribution in https://github.com/rusterlium/rustler/pull/410
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.22.2...rustler-0.23.0
📋 What's Changed
- Don't call cargo when skip_compilation? is true by @karolsluszniak in https://github.com/rusterlium/rustler/pull/389
✨ New Contributors
- @karolsluszniak made their first contribution in https://github.com/rusterlium/rustler/pull/389
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.22.1...rustler-0.22.2
📋 What's Changed
- Replace release.sh with prepare_release.sh by @evnu in https://github.com/rusterlium/rustler/pull/369
- Fix clippy by @evnu in https://github.com/rusterlium/rustler/pull/372
- Fix generic types for untagged enum codegen by @evnu in https://github.com/rusterlium/rustler/pull/371
- Allow specifying a channel for the system rustc by @jflatow in https://github.com/rusterlium/rustler/pull/347
- Fix project repo URL in error message by @ericlathrop in https://github.com/rusterlium/rustler/pull/373
- Point to HexDocs base URL for Rustler in lib.rs by @brainsnail in https://github.com/rusterlium/rustler/pull/384
- Extend rustler_mix to handle local dependencies with external_resources by @evnu in https://github.com/rusterlium/rustler/pull/386
✨ New Contributors
- @jflatow made their first contribution in https://github.com/rusterlium/rustler/pull/347
- @ericlathrop made their first contribution in https://github.com/rusterlium/rustler/pull/373
- @brainsnail made their first contribution in https://github.com/rusterlium/rustler/pull/384
- Full Changelog: https://github.com/rusterlium/rustler/compare/rustler-0.22.0...rustler-0.22.1
📋 What's Changed
- Fix module namespace by @mfeckie in https://github.com/rusterlium/rustler/pull/237
- Fix a Clippy warning (Clippy 0.0.212 / Rust 1.38.0) by @tatsuya6502 in https://github.com/rusterlium/rustler/pull/242
- Update unreachable requirement from 0.1 to 1.0 by @dependabot-preview in https://github.com/rusterlium/rustler/pull/243
- Remove superfluous use statements from proc-macros by @evnu in https://github.com/rusterlium/rustler/pull/240
- Update which requirement from 2 to 3 by @dependabot-preview in https://github.com/rusterlium/rustler/pull/247
- Bump dependencies and refactor attribute retrieval by @evnu in https://github.com/rusterlium/rustler/pull/234
- Support target pointer width. by @scrogson in https://github.com/rusterlium/rustler/pull/233
- Replace mem::uninitialized by MaybeUninit by @filmor in https://github.com/rusterlium/rustler/pull/239
- + 69 more
✨ New Contributors
- @mfeckie made their first contribution in https://github.com/rusterlium/rustler/pull/237
- @tatsuya6502 made their first contribution in https://github.com/rusterlium/rustler/pull/242
- @dependabot-preview made their first contribution in https://github.com/rusterlium/rustler/pull/243
- @BurntCaramel made their first contribution in https://github.com/rusterlium/rustler/pull/265
- @josevalim made their first contribution in https://github.com/rusterlium/rustler/pull/271
- @elbow-jason made their first contribution in https://github.com/rusterlium/rustler/pull/252
- @szlend made their first contribution in https://github.com/rusterlium/rustler/pull/289
- @wingyplus made their first contribution in https://github.com/rusterlium/rustler/pull/332
- + 5 more
✨ Added
- Support for OTP22.
- Rust linting with [clippy](https://github.com/rust-lang/rust-clippy).
- Support for decoding IOLists as binaries, `Term::decode_as_binary`.
📋 Changes
- `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.
- Replaced the hand-rolled TOML parser in `rustler_mix` with the `toml-elixir` package.
- Improve error messages for derived encoders/decoders.
- Rust `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.
