Skip to content

Comment on Managing mutable data in Elixir with Rustparent

Comments

Did you consider a port (written in Rust) instead of a NIF?

When you're presenting a GenServer like message passing interface a port is a natural fit, with none of the risks related to linking a NIF into the VM itself.

(admittedly those risks are much lower with Rust than C)

In our case one of these NIF stores is created per user for a specific task; ironically, with the amount of polish that Rustler puts around NIFs I suspect it would have been more work and more risk to go down the port route and manage everything manually.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.