Is there a way to run arbitrary swift code from inside a compiled swift program? Similar to JSCore?
Other than shelling out to
swiftc, no, not really. You could try looking into how lldb's expression evaluation works, but I wouldn't count on it being suitable for your purposes.