-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux? #60
Comments
I'm going to attempt this over the weekend. |
xD |
IBM's Swift Linux repl thing has a http server/client example(server.swift). http://swiftlang.ng.bluemix.net/#/repl |
Foundation for linux is not yet complete so very difficult to port this project to linux |
hi all, I spend some time on the support for Linux. I worked on Socket class and it compiles successfully on Linux machine ( Ubuntu 15.10 Swift 2.2 ). I removed:
I am going to continue the journey with the following roadmap:
Guys, if you have any ideas or pull requests please let me know ! best, |
Awesome! Why do you need to remove the NSURL dependency? What's missing in the How can we help?! Julien On Sunday, December 6, 2015, Damian Kołakowski notifications@github.com
|
@julien-c thanks :) The following classes works on Linux: TODO: HttpServer, HttpResponse. best, |
Hi @glock45 if you’re looking for dispatch_async try https://github.com/johnno1962/NSLinux |
hi @johnno1962 Correct me If I am wrong ? Every time I call dispatch_async the library creates a new thread and after the run all the resources are released ( which is absolutely fine for me ) ? best |
It does look to spin a thread every time... I'm confused why @johnno1962 code would be better than the dispatch_async provided by Apple/Swift? https://github.com/apple/swift/blob/8d9ef80304d7b36e13619ea50e6e76f3ec9221ba/test/ClangModules/Dispatch_test.swift I admittedly haven't used swift on Linux yet, but have been using GCD via ObjC on Linux for a long while now. http://chris.mowforth.com/posts/2011/installing-grand-central-dispatch-on-linux/ |
I've put in some work on the Linux support of One of the last roadblocks on getting basic support (first of all, getting to something that builds 😄) is the locking that happens in |
@julien-c How about something like https://gist.github.com/kristopherjohnson/d12877ee9a901867f59? |
Really it boils down to just using a NSLock and doing:
|
@C0deH4cker Your link seems to 404 |
@julien-c Thanks for a great work !!!!! I pushed two changes more and finally we compile on Linux ( with NSLinux from @johnno1962 ). I have not run it yet xD This tension kills me xD @C0deH4cker thanks for NSLock ! I've update Swifter. I've been thinking about ( dispatch_semaphore ) since it's more friendly for GCD environment we have. |
@julien-c Whoops, looks like I accidentally removed the last "9"! Try this one: https://gist.github.com/kristopherjohnson/d12877ee9a901867f599 |
I'll clone it and test on Ubuntu 14.04 now and let you know! |
( I build on Linux using "swift build" ). |
Built both NSLinux.a and Swifter.a. How are you building the samples? |
Yay! Swifter server running on Ubuntu here: http://swift.circular.io:8080/ 🎉🎉 |
The app's code is here: https://github.com/julien-c/example-package-dealer Small variation on Apple's playing card dealer example. There's a pretty sweet I had to unplug the JSON serialisation as |
I've just posted this to Hacker News, if you wish to upvote 😄 https://news.ycombinator.com/item?id=10718544 |
Got a demo running on my server as well! Took a little extra time as I didn't realize Azure firewalls new VMs from everything but SSH by default, not using iptables but external to the VM (and it seems that adding a new firewall rule is broken). Great work! |
oops, interesting, I'd setup my ObjC Linux server long enough ago I'd forgotten how I'd done it. Went back and I've been using http://nickhutchinson.me/libdispatch/ (forgot I'd even installed it) |
Hi, Happy to see it runs on Linux at last. Here's my work that makes the example run also, with build script. https://github.com/segabor/swifter/commit/918a751e1ef02cb0c13c72e20512a1465218fcc1 Gábor |
Now that Linux has Swift and GCD... any chance of porting this? https://swift.org
The text was updated successfully, but these errors were encountered: