An open API service indexing awesome lists of open source software.

https://github.com/randomhashtags/destiny

Standalone Lightweight HTTP Server using Swift Macros for routing.
https://github.com/randomhashtags/destiny

http http-server server server-side-swift swift swift-macro swift-macros web-server

Last synced: 15 days ago
JSON representation

Standalone Lightweight HTTP Server using Swift Macros for routing.

Awesome Lists containing this project

README

          

# Destiny

Requires at least Swift 6.2 Apache 2.0 License

Destiny is a standalone, high-performance and lightweight web server that makes use of the latest Swift features to push performance to the limit of the language, and designed to be easy to use while keeping the binary size small.

It provides a router (which is used via a Swift Macro) that accepts middleware, redirects, routes, and route groups for processing requests.

Features like TLS/SSL, Web Sockets and embedded support are coming soon.

## Table of Contents

- [Roadmap](#roadmap)
- [Completed](#completed)
- [WIP](#wip)
- [TODO](#todo)
- [Documentation](#documentation)
- [Benchmarks](#benchmarks)
- [Contributing](#contributing)
- [Support](#support)
- [Funding](#funding)

## Roadmap

### Completed

- [x] Custom hostname and port (Nov 8, 2024)
- [x] Middleware and Routes (Nov 8, 2024)
- [x] Register middleware/routes after starting server (Nov 8, 2024)
- [x] Support multiple data representations (Nov 8, 2024)
- [x] Routes with parameters (Nov 8, 2024)
- [x] CORS (Dec 9, 2024 | static CORS needs a little more work)
- [x] Configure settings via Command Line Arguments (Dec 11, 2024)
- [x] Redirects (Dec 11, 2024)
- [x] Route Groups (Dec 27, 2024)
- [x] Case insensitive routes (Feb 19, 2025)
- [x] Routes with wildcards (Feb 19, 2025)
- [x] Better handling of clients to unlock more throughput (Feb 23, 2025)
- [x] Response streaming (Aug 2, 2025)
- [x] Typed throws where applicable (Aug 3, 2025)
- [x] Foundation-less (Aug 5, 2025)
- [x] Swift 6 Language Mode (Aug 5, 2025)
- [x] Cookies (Aug 9, 2025)
- [x] Header parsing (Sep 9, 2025)
- [x] Request body streaming (Sep 10, 2025)

### WIP

- [ ] DocC Documentation
- [ ] DocC Tutorials
- [ ] Route partial matching (via Regex or something else)
- [ ] Unit testing
- [ ] Rate Limits
- [ ] Route queries
- [ ] Metric Middleware
- [ ] File Middleware
- [ ] HTTP Pipelining
- [ ] Embedded support

### TODO

- [ ] Allow more than 64 bytes as the compared request line
- [ ] Cache Middleware
- [ ] Data Validation (form, POST, etc)
- [ ] Authentication
- [ ] Compression support
- [ ] OpenAPI support
- [ ] Tracing support
- [ ] TLS/SSL
- [ ] Web Sockets
- [ ] Native load balancing & clustering
- [ ] Support custom middleware & routes in the macro
- [ ] Support third-party macro expansions in the macro

## Documentation

See [Documentation](https://github.com/RandomHashTags/destiny/tree/main/Sources/Documentation.docc/Index.md)

## Benchmarks

See [Performance](https://github.com/RandomHashTags/destiny/tree/main/Sources/Documentation.docc/Performance.md)

## Contributing

Create a PR.

## Support

You can create a discussion here on GitHub for support or join my Discord server at https://discord.com/invite/VyuFQUpcUz.

### Funding

This project was developed to allow everyone to create better http servers. I develop and maintain many free open-source projects full-time for the benefit of everyone.

You can show your financial appreciation for this project and others by sponsoring us here on GitHub or other ways listed in the [FUNDING.yml](https://github.com/RandomHashTags/destiny/blob/main/.github/FUNDING.yml).