Hello all!
Seeking template for developing Erlang Port application with C++.
Is there any function to create it with Rebar3 or any other solution?
Is the any kind of default template that could be downloaded?
Hello all!
Seeking template for developing Erlang Port application with C++.
Is there any function to create it with Rebar3 or any other solution?
Is the any kind of default template that could be downloaded?
The Interoperability Tutorial has an example, maybe that is a good start?
I have also studied and learned this before, and I have collected and organized some materials here: https://github.com/ErlGameWorld/eUtils/tree/master/c_src and I have modified the Nif/Port compiler tool so that it can support multiple Nif/Port files in a single project. look at this:GitHub - ErlGameWorld/eNpc: Erlang Nif or port_driver generic compilation scripts for Windows Linux Mac
When you say “Erlang Port application”, do you mean a Port or a Port Driver? The latter is faster but at the same time, like NIFs, also pretty risky:
As a port driver is dynamically linked into the emulator process, this is the fastest way of calling C-code from Erlang. Calling functions in the port driver requires no context switches. But it is also the least safe way, because a crash in the port driver brings the emulator down too.
Btw @alexandr… I think it would be good if you could make your thread titles a little more elaborate Like, “Are there any… ?” or “Where can I find… ?”