News for hackers. Stuff that matters.
Re:Using Rust with Elixir for code reuse and performance by latch on Thursday August 19, 2021 @12:36PM (#28235971)
One thing to keep in mind is that even the simplest Rust NIF will significantly slow your builds and increase your repo/artifact sizes.
Re:Using Rust with Elixir for code reuse and performance by NiklasBegley on Thursday August 19, 2021 @01:24PM (#28236680)
Author here. This is a good point. In this case we found it does slow down clean builds somewhat since we're pulling down + compiling Rust dependencies now as well as Elixir. While actually editing Elixir code I haven't experienced any noticeable slowdown for incremental builds - the Rust code is mostly static.
Re:Using Rust with Elixir for code reuse and performance by elcritch on Thursday August 19, 2021 @01:41PM (#28236872)
It's one reason I prefer lighter languages for NIF's. My personal preference is to use Nim and Nimler [1]. It generally compiles quicker than Rust while providing most of the same benefits. To be fair compiling a small Rust library doesn't take too much time. Especially compared to the performance numbers from those Rust NIFs!

1: https://github.com/wltsmrz/nimler

Re:Using Rust with Elixir for code reuse and performance by pipingdog on Thursday August 19, 2021 @08:59PM (#28241214)
It’s also important to note that a NIF can bring down your whole BEAM.
Re:Using Rust with Elixir for code reuse and performance by knotty66 on Saturday August 21, 2021 @08:43AM (#28256519)
It can but it's far less likely with Rust, that's the beauty of it.