There is an understanding gap between between Erlang NIF and System Executables (binaries).
- I understand NIF makes certain programs in erlang/elixir take advantage of the native performance. Also, I’m very well aware of the downsides of writing a NIF.
- I’m seeing many people using
System.cmd/2for using external binary in most of the cases and I’ve no objection with that.
For example, take WKHTMLTOPDF,
Most of us, use the readymade binary and we’re good with it. Why are we not preferring to use a NIF for it? Is there any specific reason behind it or due to unavailablility of a NIF library?
Is there any advantage to writing a NIF for it? So what’s the reason behind your answers! Please enlighten us!