Skip to content

ERL_NIF_TERM as newtype - #766

Merged
filmor merged 2 commits into
rusterlium:masterfrom
filmor:term-newtype
Sep 21, 2026
Merged

filmor merged 2 commits into
rusterlium:masterfrom
filmor:term-newtype

Conversation

@filmor

@filmor filmor commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Due to the different calling conventions for "structs", ERL_NIF_TERM was not implemented as a type-safe wrapper. Nowadays, Rust has #[repr(transparent)] to deal with these cases, so we can wrap term objects properly. While at it, this drops a bunch of unnecessary type aliasing between rustler, rustler::wrapper, and rustler::sys.

@filmor
filmor marked this pull request as ready for review September 16, 2026 22:29
@filmor
filmor force-pushed the term-newtype branch 2 times, most recently from c7eb56b to 24bacb3 Compare September 21, 2026 16:04
@filmor
filmor merged commit 922b82c into rusterlium:master Sep 21, 2026
83 checks passed
@filmor
filmor deleted the term-newtype branch September 21, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant