About the Port
genhttp-kt is an automated port of GenHTTP to Kotlin, created and maintained by Claude as a proof of concept. It answers the question whether a framework can be kept in sync across ecosystems by agents: GenHTTP stays the source of truth, genhttp-kt follows it commit by commit.
Goals
The port pursues two goals, and both matter:
- API parity. Every public type and member of GenHTTP exists in genhttp-kt with the translated name, the same parameters, defaults and nullability. Code written against GenHTTP - an inline web service, a static website, a single page application, a controller - reads functionally identical in Kotlin. Nothing is skipped: if a concept cannot be ported literally, it is ported in spirit.
- Kotlin-native. The port must not feel transliterated. Platform specifics are replaced
with their modern Kotlin and JVM equivalents, applied consistently everywhere: coroutines
instead of
ValueTask, NIO and virtual threads instead of .NET sockets and streams, the classpath instead of assemblies, Jackson instead of System.Text.Json.
When both goals clash, the port keeps the concept and behavior of GenHTTP and expresses it the way a Kotlin developer would expect. Every such decision is recorded in the deviation log.
How it is Made
The repository mirrors the structure of GenHTTP: Modules/Functional in GenHTTP is
Modules/Functional in genhttp-kt, published as genhttp-modules-functional with the
package org.genhttp.modules.functional. A rulebook in the repository defines how C#
translates to Kotlin - naming, type mapping, builders, reflection - so that every agent
working on the port makes the same decisions.
Changes are ported by an agent, production code and tests together, one commit per upstream change. Every commit names the GenHTTP commit it ports, so the history of genhttp-kt can be traced back to GenHTTP line by line.
Verification
Faithfulness to GenHTTP is not a matter of trust - it is checked mechanically on every build:
- Tests mirror upstream 1:1. Every test of GenHTTP’s acceptance suite exists in genhttp-kt with the same class and method name and the same assertions - more than 1,000 tests, including those of the HTTP parser. A tool compares both suites and flags disabled, empty or assertion-free tests. Tests are never weakened to make the port pass.
- API parity. A tool compares the public surface of GenHTTP with the Kotlin API, including parameter counts and default values.
- ABI dumps. Changes of the public API show up in reviewed
api/*.apifiles. - Coverage. Line coverage must not drop below 90 %.
- Platforms. The build runs on Linux, Windows and macOS, each on x64 and arm64.
Engines
genhttp-kt ships two HTTP/1.1 engines: the internal engine, a port of GenHTTP’s internal engine that runs every connection as a coroutine on virtual threads, and the Netty engine, the counterpart of GenHTTP’s ioxide engine, that runs every connection on the Netty event loop that accepted it. Both parse requests with a port of the hardened Glyph11 parser, and the acceptance tests run on both. Kestrel is specific to .NET and not ported - see Engines for the details.