Earlier quoted context omitted.
That's one way to do it, sure. In this case I had the problem of having to use a Mac for a build server, though. I did a few things to get this running: - The application server and build server are separate, with access control to the build server controlled by an API key that I can revoke should anyone gain access to it. - The process that compiles and runs your code is an unprivileged user. - All import statements…
You can execute the process under sandbox-exec to take advantage of OS X kernel-level sandboxing. You'll need to write your own profile file that allows/denys what you want. There are plenty of examples of these .sb profile files under /System/Library. More: https://developer.apple.com/library/mac/documentation/Darwin...
RunSwift: Try Swift in Your Browser
11–20 of 24 posts
Re: RunSwift: Try Swift in Your Browser
#12Re: RunSwift: Try Swift in Your Browser
#13If I hit compile I get "gtimeout: failed to run command ‘/Applications/Xcode6-Beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift’: No such file or directory"
Re: RunSwift: Try Swift in Your Browser
#14If I hit compile I get "gtimeout: failed to run command ‘/Applications/Xcode6-Beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift’: No such file or directory"
Error now changed to "233168 sh: /var/folders/mq/sxspn0v179z03ljffqzb7vk00000gn/T/./run-swift.IBiDbHOX: Operation not permitted"
Edit: Rolled back my changes; I'll sort them out when the server is a little busy :) Happy Saturday!
Re: RunSwift: Try Swift in Your Browser
#15Hi! I made RunSwift this past week and thought it was pretty neat so I wanted to share it. Have fun!
I've always wondered how these are made. Does it run in some kind of virtualised container?
Re: RunSwift: Try Swift in Your Browser
#16Earlier quoted context omitted.
You can execute the process under sandbox-exec to take advantage of OS X kernel-level sandboxing. You'll need to write your own profile file that allows/denys what you want. There are plenty of examples of these .sb profile files under /System/Library. More: https://developer.apple.com/library/mac/documentation/Darwin...
Excellent! Thank you for pointing me to this!
That said, the best, most foolproof way of doing this really comes down to using OS X to virtualize OS X.
Or you could try cross-compiling. It seems to work here: https://github.com/swift-x/tools (which looks interesting...)
It's possible that by the end of this week, maybe next, it will be very easy indeed to compile and/or run Swift on Linux from Linux, at which point you could try LXC or a million other ways to virtualize.
Re: RunSwift: Try Swift in Your Browser
#17Earlier quoted context omitted.
That's one way to do it, sure. In this case I had the problem of having to use a Mac for a build server, though. I did a few things to get this running: - The application server and build server are separate, with access control to the build server controlled by an API key that I can revoke should anyone gain access to it. - The process that compiles and runs your code is an unprivileged user. - All import statements…
You can execute the process under sandbox-exec to take advantage of OS X kernel-level sandboxing. You'll need to write your own profile file that allows/denys what you want. There are plenty of examples of these .sb profile files under /System/Library. More: https://developer.apple.com/library/mac/documentation/Darwin...
Re: RunSwift: Try Swift in Your Browser
#18Hi! I made RunSwift this past week and thought it was pretty neat so I wanted to share it. Have fun!
Re: RunSwift: Try Swift in Your Browser
#19Hi! I made RunSwift this past week and thought it was pretty neat so I wanted to share it. Have fun!
Re: RunSwift: Try Swift in Your Browser
#20BTW we are running a Swift hackathon @ GitHub HQ in a few weeks, it would be cool if you could join us: http://www.swifthack.splashthat.com