Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我主要通过端口驱动程序来连接 Erlang,但现在随着erl_nif 功能的出现,我想知道我是否应该再投资端口驱动程序。
erl_nif
功能会erl_nif繁荣还是萧条FFI?
FFI
端口和 NIF 具有不同的属性并为不同类型的事物建模:端口表现为进程,您通过正常的消息传递与它们进行通信,而 NIF 看起来像正常的函数调用。所以这真的取决于你想要接口什么以及它们的行为方式。两者都有自己的位置。