So... Theoretically, you could write some web-based code that ran on an OSX server that accepted Objective-C or Swift files, compiled them, ran them, then returned result
But the scary part would be what if the code you were compiling did dangerous things...
I'm not enough of a super user (not at all) to know what could be done to prevent things like deleting hard drive...