views:

119

answers:

0

I have quite a lot of code written in Erlang, which I want to include in applications written in Objective-C, eg on the iPad. Ideally I would want to have an object that encapsulates the Erlang run-time; this could then be accessed like the standard Erlang shell, something along the lines of:

ErlangRT *runtime = [[ErlangRT alloc] init];
ErlangValue *retval = [runtime execute:@"io:format(\"hello world~n\")"];

I don't care too much about performance etc; I can see how it could work, but as I don't know too much about the way the Erlang VM is implemented I have no idea how easy or difficult it is to do, or if anybody has already done something similar. I know there are other ways of interfacing between Objective-C and Erlang, but they seem to assume an independently installed Erlang system on the target machine. I would prefer it to be like a library that you simply link in with the application.

So my question is: is this comparatively easy to do, and/or has somebody already worked on this?