News for hackers. Stuff that matters.
Re:Rustler is a library for writing Erlang NIFs in safe Rust... by algaeontoast on Monday September 16, 2019 @08:13PM (#20989854)
Does anyone know of an example of a rust library or function that’s been turned into a NIF? Ideally available on GitHub both before and after the conversion?

Also, the “nerves” framework is basically 80% NIFS of embedded C code.

Re:Rustler is a library for writing Erlang NIFs in safe Rust... by elcritch on Tuesday September 17, 2019 @03:54AM (#20992704)
Nerves overall has a much smaller portion of C nifs than 80%, probably < 10%. Mainly for properly trapping and cleaning up subprocesses. There’s some nifs too setup Linux specific sockets/ioctls. Still surprises me that almost every Linux kernel interface essentially overloads `ioctl`.

Not sure of an example. Really just wrap any rust function with appropriate code to convert Erlang terms to rust and back... There’s a few elixir rustler howtos: https://medium.com/@jacob.lerche/writing-rust-nifs-for-your-...

Re:Rustler is a library for writing Erlang NIFs in safe Rust... by lostjohnny on Tuesday September 17, 2019 @04:38AM (#20992959)
You could check the list of packages depending on Rustler

https://hex.pm/packages?search=depends%3Arustler