Swift Package Ecosystem for WendyOS
This skill maps the Swift package ecosystem for WendyOS (Linux) edge development. It provides curated recommendations organized by domain and guidance for discovering additional packages via Swift Package Index.
Curated Package Catalog
Web / HTTP Servers
Networking / SwiftNIO
Databases
ML / AI Inference
For llama.cpp and whisper.cpp, use the C API directly via Swift's C interop or use community Swift wrapper packages. These libraries compile natively on ARM64/AMD64 Linux.
Hardware / IoT
Camera/video access patterns: Use Video4Linux2 (V4L2) through Swift's C interop for camera capture on Linux. For NVIDIA Jetson, use GStreamer pipelines via Process or C bindings for hardware-accelerated video.
Serial communication: Use termios via Swift's C interop for serial port access on Linux. SwiftyGPIO also provides UART support for common SBCs.
Observability
Serialization / Codable
Concurrency / Utilities
Linux Compatibility Checklist
Before adding a Swift package to a WendyOS project, verify:
- No Darwin-only imports — Check for
import Darwin, import AppKit, import UIKit, import CoreFoundation (some Foundation APIs are fine on Linux, but not all)
- Foundation compatibility — Avoid APIs that are unimplemented on Linux:
FileManager works, but NSAppleScript, NSUserDefaults, Process (partially available), etc. may not
- No Xcode build system dependencies — The package must build with
swift build (SPM), not require Xcode-specific settings
- ARM64/AMD64 CI/testing — Check if the package has Linux CI (GitHub Actions with
ubuntu runners or Swift Docker images)
- C dependencies — If the package wraps a C library, ensure that library is available on ARM64/AMD64 Linux (e.g., via apt)
- Swift version — WendyOS uses recent Swift toolchains; confirm the package supports Swift 5.9+
Finding Packages on Swift Package Index
Swift Package Index is the community package search engine.
How to search
- Go to https://swiftpackageindex.com and enter your search term
- Use the Platform filter to select Linux to find Linux-compatible packages
- Check the Compatibility Matrix on each package page — it shows which Swift versions and platforms are tested
Evaluating package quality
- Last activity — Prefer packages updated within the last 6 months
- Swift version compatibility — Should support Swift 5.9 or later
- Platform badges — Look for the Linux badge on the package page
- License — Prefer Apache 2.0 or MIT for commercial use
- SSWG status — Packages incubated by the Swift Server Work Group are production-vetted
Search URL pattern
Direct search: https://swiftpackageindex.com/search?query=YOUR_TERM
Best Practices
- Use the curated list first — Packages listed above are vetted for Linux and WendyOS compatibility
- Prefer SSWG packages — Swift Server Work Group packages (SwiftNIO, swift-log, async-http-client, Hummingbird, PostgresNIO) have strong Linux support guarantees
- Watch for architecture-specific code — Swift packages compile from source, so ARM64/AMD64 works automatically unless the package contains x86-specific assembly, SIMD intrinsics, or architecture-gated
#if blocks
- Avoid Darwin-only dependencies — Even transitive dependencies can break Linux builds; use
swift package show-dependencies to audit the tree
- Pin to stable versions — Use
.upToNextMajor(from:) or .upToNextMinor(from:) in Package.swift rather than branch-based dependencies
- Fall back to Swift Package Index — If the curated list doesn't cover your need, search swiftpackageindex.com with the Linux platform filter
- Test on Linux early — Build and run on a WendyOS device or Linux VM early to catch missing Foundation APIs and Darwin-only dependencies before they compound