$ account pointfreeco
This repository provides a composable, invertible parsing library for Swift, built around the core `Parser` and `ParserPrinter` protocols. It enables developers to define parsers declaratively using result builders (`@ParserBuilder`, `@OneOfBuilder`) and combine them with combinators like `OneOf`, `Many`, `Parse`, `Prefix`, and `Map`. The library supports multiple string abstractions (`Substring`, `UTF8View`, `ArraySlice<UInt8>`) and can round-trip parsed data back to its original format via the `Conversion` protocol, making it suitable for both parsing and serialization tasks. The architecture is protocol-oriented and highly modular. Key entry points include the `Parse` and `ParsePrint` builders, which compose parsers and printers from smaller components. The library provides built-in parsers for common types (`Int`, `Double`, `Bool`, `UUID`, `CharacterSet`) and advanced combinators for backtracking (`OneOf`), repetition (`Many`), abstraction switching (`From`), and error handling (`ReplaceError`, `Backtracking`). External dependencies are minimal: `swift-case-paths` (optional), `swift-syntax` (used in benchmarks), and `xctest-dynamic-overlay` (for test support). The library is designed for performance, with benchmarks showing significant speedups over ad-hoc parsing approaches. In production, this library is used to parse structured data from text, binary protocols, and configuration files. Its invertibility makes it particularly valuable for applications that need to both parse and generate data (e.g., serializers, code generators, DSL interpreters). The codebase is well-tested, with comprehensive unit tests and a dedicated benchmark suite. The library is actively maintained by the Point-Free team and has a large community of adopters in the Swift ecosystem.
pointfreeco/swift-web is a collection of modular Swift libraries for building server-side web applications. It provides a functional approach to routing (ApplicativeRouter using partial isomorphisms and applicative combinators), a type-safe CSS DSL (Css module), an HTTP pipeline middleware system with phantom types for state safety (HttpPipeline), URL form encoding/decoding, HTML rendering integration, and signed cookie support. The architecture is highly modular: each library can be used independently. The codebase demonstrates advanced functional programming patterns from the Point-Free ecosystem, including applicative functors, optics, and monoids. It relies on Apple's SwiftNIO for server I/O and supports both macOS and Linux via Docker. The project is experimental but well-tested with snapshot testing. It is best suited for Swift developers seeking a functional, composable web framework foundation.