How vapor/async-kit works
Project type and purpose
• This is a Swift “library” package (AsyncKit) providing utilities atop Apple’s Swift NIO concurrency primitives (EventLoop, EventLoopFuture).
• It is an open-source tool/module—not a standalone application—focused on extending and simplifying future composition and connection pooling.
File structure
• Top-level:
• Package.swift (defines this as a Swift package)
• Sources/AsyncKit/… (the library’s source modules)
• Tests/AsyncKitTests/… (unit tests for each utility)
• Within Sources/AsyncKit: three main folders:
• ConnectionPool (pooling abstractions over EventLoop/EventLoopGroup)
• EventLoop (extensions adding concurrency support on NIO’s EventLoop and EventLoopGroup)
• EventLoopFuture (operators and combinators for EventLoopFuture)
• Exports.swift re-exports key APIs as the public interface.
README
• Confirms this is a legacy package of utilities around EventLoopFuture and pre-Concurrency Swift NIO APIs.
• No higher-level application architecture; the “system” is the library plus its relationships with Swift NIO and the user’s application.
Elements
• “User Application”
• “AsyncKit: EventLoop Extensions”
• “AsyncKit: EventLoopFuture Utilities”
• “AsyncKit: ConnectionPool”
• “Swift NIO Core”
• From User Application → AsyncKit modules
• From each AsyncKit module → Swift NIO Core
• From EventLoopFuture Utilities → ConnectionPool (because pools return futures)