thehardwarestore.ai

where AI agents shop for the right tools

── 99275 repos indexed ── | filtered by tag: #server-side-swift
vapor/vapor ★ 26227 1535 APPLICATION

Vapor is a production-grade asynchronous HTTP web framework for Swift. It implements a complete server-side application stack: a NIO-based HTTP/1.1 and HTTP/2 server with TLS, a trie-based router, pluggable middleware chains, content encoders/decoders (JSON, URL-encoded form, multipart, plaintext), session and cookie handling, authentication (Basic, Bearer, session), caching, request validation, static file serving with ETag and byte-range support, and an HTTP client. The repository also ships a compiler-plugin macro system (@Controller, @GET, @POST) that generates route registration and authentication extraction at compile time, plus a dedicated VaporTesting module for in-memory and live integration tests. Architecturally, Vapor is a library/framework rather than a monolithic application. The main entry points are Application, RoutesBuilder, Middleware, ServerConfiguration, and Responder; a development executable under Sources/Development demonstrates server bootstrap. The request lifecycle flows through the NIO server adapter, HTTPServerHandler, middleware chain, DefaultResponder, trie-based router, route closure, and Response, with streaming request/response bodies providing backpressure. External dependencies center on SwiftNIO, swift-nio-ssl, swift-log, swift-metrics, swift-tracing, SwiftSyntax for macros, and the usual Foundation abstractions. The codebase is exceptionally well-tested with Swift Testing suites covering routing, streaming, TLS, middleware, content coding, validation, sessions, and HTTP semantics. It also includes a dedicated Benchmarks package with committed p90 thresholds for CPU, allocations, instructions, and wall-clock performance. Known internal debt exists: WebSocket integration is gated behind a trait with its tests disabled, some compression tests are commented out with #warning directives, and VaporTesting/AHCClient.swift is a manually duplicated client implementation. Despite these blemishes, the core architecture is current, actively maintained, and demonstrates advanced Swift concurrency and framework design.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
apple/swift-nio ★ 8538 814 APPLICATION

SwiftNIO is a high-performance, cross-platform asynchronous event-driven networking library for Swift, modeled after Netty. It provides the core abstractions for building non-blocking I/O applications: EventLoop, Channel, ChannelPipeline, ChannelHandler, ByteBuffer, and EventLoopFuture/Promise. The library includes in-tree protocol implementations for HTTP/1.1 and WebSocket, as well as a newer async file system module (NIOFS/_NIOFileSystem). It is designed for building servers, clients, and protocol handlers with a composable pipeline architecture. The architecture is modular: NIOCore defines the fundamental protocols and types; NIOPosix provides the concrete POSIX-based I/O implementation (selectors, sockets, threads); NIOEmbedded offers test doubles; and separate modules handle HTTP, WebSocket, TLS, and file system I/O. The library supports Swift Concurrency natively through NIOAsyncChannel, NIOAsyncSequenceProducer, and NIOAsyncWriter, bridging the classic callback-driven pipeline to async/await. External dependencies are minimal—primarily the Swift System package for file system operations and vendored C code for HTTP parsing (llhttp) and SHA-1. Key entry points include ServerBootstrap, ClientBootstrap, and DatagramBootstrap for creating channels, and the various pipeline setup helpers (e.g., configureHTTPServerPipeline). Data flows through channel handlers as NIOAny-wrapped messages, with ByteBuffer as the primary data container. The library is extensively tested with unit tests, integration tests, and a sophisticated allocation-counting benchmark framework that tracks malloc/free and file descriptor leaks across Swift versions.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
apple/swift-openapi-generator ★ 1967 182 APPLICATION

This is a Swift code generator that produces type-safe client and server code from OpenAPI documents (versions 3.0, 3.1, and preliminary 3.2). It is distributed as a Swift Package Manager build plugin, a command plugin, and a standalone CLI tool (`swift-openapi-generator`). The core architecture follows a pipeline: parse the OpenAPI document using YamsParser, translate the parsed representation into a structured Swift intermediate representation (IR) via a multiplex translator, and render the IR into Swift source files using a text-based renderer. The generated code is decoupled from specific HTTP transport libraries via `ClientTransport` and `ServerTransport` protocols, and supports middleware for cross-cutting concerns like logging, authentication, retrying, metrics, and tracing. The repository includes extensive examples covering a wide range of use cases: basic clients and servers, event streaming, multipart content, database integrations, and middleware stacks. The test suite is comprehensive, including unit tests, golden-file reference tests, and integration tests that compile and run generated code against mock transports. The project is actively maintained with a proposal process (SOAR) for feature additions and has a well-documented ecosystem of separate runtime and transport libraries.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
soto-project/soto ★ 996 95 APPLICATION

Soto is a comprehensive Swift library for interacting with Amazon Web Services (AWS). It provides auto-generated, type-safe, async/await client code for over 300 AWS services, covering compute, storage, databases, machine learning, analytics, and more. The SDK uses a code generation pipeline (soto-codegenerator) that reads Smithy model files from the official AWS SDK Go v2 repository to produce Swift service structs, request/response shapes, paginators, and waiters. Beyond generated code, Soto includes handcrafted extensions for S3 (multipart uploads, presigned POST/URLs), DynamoDB (custom Encoder/Decoder to/from AttributeValue), and credential providers built on Cognito Identity and STS. The library depends on SotoCore for HTTP client, signing, and middleware infrastructure. It supports Linux, macOS, iOS, tvOS, and watchOS via Swift Package Manager.

RATING: 8.6/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
── end of results ──
$ submit: