Skip to content
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

Planned Cross-Platform support? #13

Open
codynhat opened this issue Sep 29, 2015 · 11 comments
Open

Planned Cross-Platform support? #13

codynhat opened this issue Sep 29, 2015 · 11 comments

Comments

@codynhat
Copy link

With Swift being released as open source soon, are there any plans to make this project cross-platform? Specifically, Linux? I know Apple is planning on releasing a compiler for Linux. It would be awesome to have a robust Swift web framework that can run on a Linux web server.

@Danappelxx
Copy link
Collaborator

+1

@izqui
Copy link
Owner

izqui commented Sep 30, 2015

Yes! That's the idea, but we it is difficult to anticipate without knowing what will be allowed in Linux Swift.

The first step I took towards that goal is abstracting the Socket protocol, in case we can't use CocoaAsyncSocket when it launches, to make the transition easily.

The other thing that bugs me is that it relies heavily on Foundation (lots of NSData around) and it is unclear whether it could be used from Linux.

Long story short, making it cross-platform is definitely the goal and we would love to have as much help as posible.

Thanks for the interest.

@codynhat
Copy link
Author

codynhat commented Oct 9, 2015

Looks like Node.js is built on https://github.com/libuv/libuv. Could that be an option?

@Danappelxx
Copy link
Collaborator

There's a lot of socket libraries around in c and objective-c - I even found one in Swift without any Foundation dependencies. I agree with @izqui though, you can't really predict how much control over Swift Apple is going to give, so it's kind of useless to find another dependency that could be just as likely to be unusable when Swift does go open source. I would instead try to get rid of as much Foundation use in Taylor as possible, since it is very unlikely that Apple will open source it.

@perezpaya
Copy link
Collaborator

@Danappelxx +1

@izqui
Copy link
Owner

izqui commented Oct 13, 2015

I started implementing the socket protocol with the library @Danappelxx introduced.

I got it to work, but I have this little issue that I'm trying to figure out now helje5/SwiftSockets#10

I started working on it in the swiftsockets branch https://github.com/izqui/Taylor/blob/swiftsockets/Taylor/Socket.swift

@izqui
Copy link
Owner

izqui commented Oct 13, 2015

Ups, something is weird with the headers also, will have to look at it in more detail.

@izqui
Copy link
Owner

izqui commented Oct 13, 2015

Solved! swiftsockets is working now :)

@Danappelxx
Copy link
Collaborator

Nice!

@Danappelxx
Copy link
Collaborator

Now that Swift is open source, I think we should work on making Taylor linux compatible. I put some thought into this and I believe the biggest thing stopping us is the use of Foundation - most importantly NSData. The solution I see popping up is using [Int8] for bytes, and I think we should do the same.

@jhoughjr
Copy link

jhoughjr commented Feb 7, 2016

Might be old news, but I believe Foundation is working in Linux under Swift 2.2 according to Swift.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants