I've seen a learning app doing this.
It runs the swift code inside the iOS app. so I downloaded the swift's source code and now I don't know what should I do next.
it's completely different from something like bridge ... the user must write the code ... not me ... for example in python we can use it's library to run a command given as string:
#include <Python.h>
int main(int argc, char *argv[]) {
Py_SetProgramName(argv[0]); /* optional but recommended */
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
"print 'Today is',ctime(time())\n");
Py_Finalize();
return 0;
}
now I'm searching for something like: SwiftRun_SimpleString("print(\"Hello!\")");