Lightweight, flexible HTTP server framework written in Swift

What's New



Minor release changes

  • Make HBMethods.constructResponder public. PR #316

Other changes

  • Update
  • Fix small code mistake in Encoding and PR #304 from @sidepelican

Lightweight, flexible, modern server framework written in Swift.


Hummingbird is a lightweight, flexible modern web application framework that runs on top of a SwiftNIO based server implementation. It is designed to require the minimum number of dependencies.

It provides a router for directing different endpoints to their handlers, middleware for processing requests before they reach your handlers and processing the responses returned, custom encoding/decoding of requests/responses, TLS and HTTP2.

import Hummingbird

// create router and add a single GET /hello route
let router = Router()
router.get("hello") { request, _ -> String in
    return "Hello"
// create application using router
let app = Application(
    router: router,
    configuration: .init(address: .hostname("", port: 8080))
// run hummingbird application
try await app.runService()

Hummingbird v2 is currently in development an beta release is available if you'd like to try it out.

Hummingbird Extensions

Hummingbird is designed to require the least number of dependencies possible, but this means many features are unavailable to the core libraries. Additional features are provided through extensions. The Hummingbird repository comes with additional modules

  • HummingbirdJobs: framework for pushing work onto a queue to be processed outside of a request (possibly by another server instance).
  • HummingbirdRouter: an alternative router that uses a resultbuilder.
  • HummingbirdTLS: TLS support.
  • HummingbirdHTTP2: Support for HTTP2 upgrades.
  • HummingbirdTesting: helper functions to aid testing Hummingbird projects.

And also the following are available in other repositories in this organisation


You can find reference documentation and user guides for Hummingbird here. The hummingbird-examples repository has a number of examples of different uses of the library.


  • Swift Tools 5.9.0
View More Packages from this Author


Last updated: Thu May 30 2024 03:46:23 GMT-0900 (Hawaii-Aleutian Daylight Time)