Reputation: 1189
is it possible to run erlang vm from withing C application? I'd like to use as script engine from my game and cannot find any erlang API or other "official" way how to do that ...
Thanks!
Upvotes: 0
Views: 115
Reputation: 9289
Erlang VM takes some time to boot, so it wouldn't make sense to start and stop it each time, you want to make a call. The only solution is to have it running all the time (it is not that heavy). You can communicate with your C code using raw TCP or C nodes. You can read more about different interoperability options here:
http://www.erlang.org/doc/tutorial/users_guide.html
Erlang is good for orchestration, while C++ is good for raw computation, so usually people do it the other way round: they call C from Erlang.
Upvotes: 2