Skip to content

Tiny HTTP server engine written in Swift

github.com/glock45
35 pointsEthan_Mick12 comments
On HN

Comments

I wonder how dependencies on Foundation will be handled when Swift 2 gets open sourced. Will that be ported as part of the runtime, or will things just depend on linking in platform native stuff?

It'll be interesting to see how cross platform code plays out in Swift (if it does at all).

Note that part of Foundation (including the network stuff I think) is already open-source as part of CF: http://www.opensource.apple.com/source/CF/

That's cool, but I'd really like to see a version of this that doesn't use Foundation APIs (which won't be open sourced) so that we can, eventually, run this on Linux.

I thought so too but on another thread jahewson commented that Core Foundation is already open source (https://news.ycombinator.com/item?id=9739424). It's all here: http://www.opensource.apple.com/source/

I'm not sure though whether these are the current versions or something older.

These are the current versions, if you go a directory higher, you'll find a way to see the foundation implementation for each OS version:

http://www.opensource.apple.com/

They usually appear with around 3-6 months delay after the initial operating system release

Sweet, didn't know that. I don't think that Foundation will be be packaged with "open-source" Swift, so making use of it on Linux won't be trivial. Plus, it'd be preferable not to have to use Foundation in either case IMO.

Ah, I was just wondering about Foundation in the open sourced version. Thanks.

I can't wait until there are Sinatra and Rails equivalents for Swift (once they open source the Linux bindings later this year).

This is awesome, thanks.

Not to be confused with Swifter, the Swift Twitter client. https://github.com/mattdonnelly/Swifter

A 140 character web server would be mighty impressive.

My point being, I know the language is called Swift and all, but the existing library is the second Google result for "swifter". Even the most cursory of attempts to avoid a name collision could have prevented this confusion. That said, I think what the author has built is pretty cool and didn't mean to detract from that.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.