user3169252
user3169252

Reputation: 1189

How to run erlang from c application?

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

Answers (1)

tkowal
tkowal

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

Related Questions