'Curated Swift package ecosystem for WendyOS and Linux. Use when developers mention: (1) Swift packages for Linux or ARM64/AMD64, (2) choosing a Swift library, (3) Swift Package Index, (4) swiftpackageindex.com, (5) what Swift library to use, (6) Swift on WendyOS dependencies, (7) edge computing Swift libraries.'
name: wendy-swift
description: 'Curated Swift package ecosystem for WendyOS and Linux. Use when developers mention: (1) Swift packages for Linux or ARM64/AMD64, (2) choosing a Swift library, (3) Swift Package Index, (4) swiftpackageindex.com, (5) what Swift library to use, (6) Swift on WendyOS dependencies, (7) edge computing Swift libraries.'
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.
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.
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.
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+
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