The Swift open source community is growing, but the cross-platform codebase is not huge yet. Help expand it by making something and adding it to the index :)
Our objective is to feature cross-platform libraries, designed for wherever Swift runs ;)
-
add to the Index? Issue a Pull Request!
-
know if a project can be added? You can add all projects you like as long as the following conditions are met:
-
Project is actively maintained
-
Linux support is stable or at least planned.
-
If it's a library, it has tests
Why are tests required for libraries?
- Unlike apps, libraries can't be run to check if they work as intended. They have to be used in a program or checked by a test suite.
- In general, testing will be more exhaustive than usage.
- Testing can also be automated using continuous integration.
- Tests can be set up to run on different platforms. This helps in keeping compatibility.
-
-
help? Give us feedback about what you'd like to see here. Currently we're making a List, but it could be a table as well with important characteristics like (a) State of development and (b) Systems supported, on the columns of the grid.
Note: every library listed here is supported both on Darwin and Linux, unless noted otherwise.
Tags: parsing, CLI, arguments, command, console, terminal, shell
- CLSwift: Framework for writing command-line tools in Swift. Includes type safe argument parsing, input validation, and generated help messages.
- Commandant: a framework for parsing command-line arguments.
- Commander: a framework for parsing command-line arguments.
- SDGCommandLine: tools for implementing a localized command‐line interface.
- SwiftCLI: a framework made to develop CLIs in Swift
- SwiftShell: a framework for running shell commands and handling their inputs and outputs.
- Vapor-Console: provides APIs for performing console I/O, including outputting stylized text, requesting user input, and displaying activity indicators like loading bars.
Tags: reactive, promise, async, result
- AsyncNinja: primitives for enabling concurrency and reactive programming.
- Deferred: a small futures library.
- PromiseKit: a complete implementation of promises, allowing for easy asyncronous programming.
- ReactiveSwift: cross platform, reactive programming.
Result + async + Sequence = ReactiveSwift
- Result: microframework for modeling and handling errors in code.
- RxSwift: reactive programming in Swift.1
- Euclid: a library for creating and manipulating 3D geometry using techniques such as extrusion and CSG (Constructive Solid Geometry). Includes SceneKit, CoreGraphics and CoreText integration on supported platforms (iOS, macOS).
Tags: logging, debugging, trace
- TraceLog: A debug and trace logging framework.
- TraceLog Adaptive Writer: A Writer implementation for the TraceLog logging system that logs to the system logging facility on the platform that it is running on (Linux systemd Journal on Linux and Apple Unified Logging on Darwin).
Tags: BDD, testing, quickcheck, property
- danger-swift: Stop saying "you forgot to …" in code review.
- Nimble: matcher and testing counterpart for Quick.
- Quick: a BDD framework.
- Spectre: a BDD framework and test runner for Swift.
- SwiftCheck: a powerful library for Property Testing. Inspired by Haskell's QuickCheck.
Tags: compression, random, sourcekit, files, YAML
- Files: a nicer way to handle files and folders on Swift.
- iNotify: a Swift wrapper around Linux's C library
inotify
. Makes it possible to have File Events like those you can subscribe to on Darwin (Linux library, emulatesFSEventStream
APIs). - Perfect-Zip: wrapper over the
minizip
C library. Provides simple zip and unzip functionality. - RandomKit: random data generation simple and easy.
- SourceKitten: a Swift framework and command-line tool for interacting with SourceKit.
- Yams: a sweet and swifty YAML parser. Built over the
libyaml
C library.
Tags: image processing
- EasyImagy: basic image processing toolbox
Tags: heap, queue, graph, sorted, generic, search
-
SortedArray: a generic array that keeps its elements sorted according to a given sort predicate.
-
SwiftGraph: a very complete implementation of the graph data structure.
Included in SwiftGraph is...
- Support for weighted, unweighted, directed and undirected graphs. Graphs are generic over the types of their weights and vertices.
- Search functions like DFS, BFS and Dijkstra's algorithm.
- Utility functions for topological sort, Jarnik's algorithm to find a minimum-spanning tree, detecting a DAG (directed-acyclic-graph), and enumerating all cycles.
-
SwiftPriorityQueue: a generic Priority Queue, implemented using a binary heap over an array.
- Expression: a framework for evaluating mathematical expressions at runtime. Supports user-defined functions and operators, and can be used to implement anything from a simple calculator to a fully-fledged functional programming language.
Tags: regex
- Guitar: string and regex library written in Swift.
Tags: autocomplete, metaprogramming, templates, linting
- langserver-swift: a Swift implementation of the open Language Server Protocol. Linux port on the making.
- SourceKittenDaemon: Swift auto-completions for any text editor. Linux port in progress.
- Swift Development Environment: a vscode plugin for Swift including autocompletion. Supports Linux and Darwin.
- Sourcery: a command-line tool for metaprogramming for Swift. Runs on Darwin. Linux support is planned.
- Stencil: a templating engine inspired by Django and Mustache.
- SwiftFormat: a command-line tool to format your Swift code.
- SwiftLint: a command-line tool to lint your Swift code.
Tags: scripting, metadata, project, install
- Archery: a Swift framework and command-line tool to manage your projects' metadata.
- Beak: allows executing functions from your command line.
- Marathon: a command-line tool to run and manage Swift scripts.
- Mint: a Swift framework and command-line tool to run and install Swift Package Manager command-line tools.
- Workspace: a command‐line tool for centralized validation and maintenance of Swift packages.
Tags: async, http, server, web
- Embassy: a lightweight async HTTP server library.
- Kitura: a server-side Swift web framework.
- Tris: a swift toolbox (async, io, crypto and more) with web server built on top. WIP
- Vapor: a server-side Swift web framework.
Tags: hash, crc, authentication, cipher block mode, aes, pbkd, hmac
- CryptoSwift: crypto related functions and helpers for Swift, implemented in Swift.
Tags: localization, preferences, random, precision, pattern matching
- SDGCornerstone: cross‐platform, full‐grammar localization; cross‐platform, bindable preferences; generic pattern matching; randomization; arbitrary‐precision arithmetic; etc.
1: RxSwift doesn't currently support swift test
. In order to run its test suites, use their script ./scripts/all-tests.sh