Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (50 sloc) 2.32 KB

Navigating the Ecosystem

Now that Swift is installed, there's still a major problem: the ecosystem. Many Swift libraries are designed with macOS and/or iOS in mind, meaning they rely (either intentionally or accidentally) on Cocoa APIs and Darwin C library bindings.

Pure Swift

The best indicator that a library will work on Linux is if it mentions pure Swift somewhere in the name. This term basically means that it likely won't depend on any Cococa APIs, at minimum.

In addition, the presence of a Package.swift file, used by the Swift package manager, means that it doesn't require something like CocoaPods to build.

Note that when I say pure Swift, I'm not referring to this GitHub organization. Although they create pure Swift libraries, that's about it.

Libraries

Here are some awesome libraries that work on Linux:

Web

  • Vapor: A popular backend web framework. The developers also maintain the PPA mentioned in :ref:`Installing Swift`.
  • Kitura: A web framework by IBM. Note that, although they have Linux support, the documentation is very macOS-centric. It tends to assume you develop on macOS and deploy to Linux.

CLI

GUI

Parsing

Miscellaneous

  • Regex: Regular expressions.

Submitting

Feel free to submit more libraries!