swift-server / swift-server/swift-http-server

Consider using traits (or some other mechanism) to remove overhead of unused features

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement size/M status/needs-design
Dominant language
Swift
Stars
44
Forks
13
Avg merge
4d 3h
Merged PRs (30d)
8

Description

From https://forums.swift.org/t/designing-an-http-server-api-for-swift/85255/2

We should consider using traits to disable features that are not needed by users of the NIOHTTPServer.
For instance, if a user is only interested in using HTTP1 over plaintext, TLS and HTTP2 wouldn't be needed, and thus the overhead of bringing in all those dependencies could be avoided.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the NIOHTTPServer entry point and how HTTP/1 plaintext, TLS, and HTTP/2 dependencies are brought in. Compare the current dependency structure with the proposed traits approach, and define done as allowing users to avoid unused feature dependencies without losing supported server functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api, backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.