Distill a Swift package to its public API: a compact interface to read, snapshots to query and diff.
Overview · Quick look · Install · Usage · Requirements · Documentation · Contributing · License
Read public declarations reported by the compiler without walking a package’s implementation. Markdown serves people and JSON serves machines, with explicit gaps and deterministic normalization for identical observations. See the interface guide for measured sizes, budgets, collection scope, and limits.
Collect swift-semver, then query its incrementing declaration within a byte budget:
Add the package and the InterfaceDistiller product to Package.swift:
dependencies: [
.package(
url: "https://github.com/swift-library/swift-interface-distiller.git",
.upToNextMinor(from: "0.4.0")
),
],
targets: [
.target(
name: "YourTarget",
dependencies: [
.product(name: "InterfaceDistiller", package: "swift-interface-distiller"),
]
),
]Install the command-line tool with Homebrew:
brew install swift-library/tap/swift-interface-distillerOn macOS, the formula requires macOS 15 or later and Xcode 26.6 or later with Swift 6.3 or later selected. See the tap requirements.
Build the executable from a checkout with
swift build --build-system native -c release; it is written to
.build/release/interface-distiller.
Note
swift-interface-distiller is pre-1.0. Minor releases may include source-breaking
changes, so depend on it with .upToNextMinor(from:).
Choose the package, modules, configuration, and optional scope explicitly. Query or slice a snapshot as JSON, Swift, or Markdown, then compare it with a release snapshot; the interface guide explains the workflow and commands lists the complete grammar.
- Swift 6.3 or later; macOS 15 or later, or Linux. The library and bundled command-line tool share the macOS deployment floor.
- A matching compiler, SDK and target configuration for collection. Consuming existing snapshots through the library does not run a compiler.
- Clang ExtractAPI for C and Objective-C headers.
The shared CI compiler matrix selects only the latest stable Xcode, currently
Xcode 26.6 on macOS 26. Linux tests use Swift 6.3.3 on Ubuntu 24.04. Older macOS
generations are covered by compile-time availability checking against the latest
SDK. The capability matrix records tested combinations and
compiler/SDK limits. The validation configuration
declares the compiler matrix, formatting paths, Linux image, DocC target, terminal
demo and repository checks. See Contributing for local validation.
Temporary output belongs in .build/.
-
Reading public interfaces: measured sizes, queries, budgets, and boundaries.
-
Usage guide: examples, behavior, and limits.
-
Contracts and JSON schema
-
Commands and capabilities
Read the contributing guide and run its local checks before submitting a pull request. Report vulnerabilities through the private route in the security policy. This project follows the code of conduct.
swift-interface-distiller is available under the Apache License 2.0 with the Swift Runtime Library Exception. See LICENSE.txt and NOTICE.