A developer ported 37signals’ Rust Campfire implementation to Kotlin and held the two ports to a strict byte-for-byte contract: every response, including headers in the same order, must match the Rust port. The Kotlin implementation runs on the JVM (Java 25) or as a GraalVM native image, uses Netty for HTTP and the same SQLite amalgamation via Java FFM, and reproduces the Rust HTML parser behavior. The port was created with Claude Code in about 24 hours, underwent profiling and an independent review that fixed correctness and blocking issues, and exercised exhaustive parity checks (306 closed-loop measurements, millions of responses, zero invalid responses). The build and test process also ported the finished-response cache and matched upstream cache behavior.
Benchmarks on Hetzner x86 hardware (one-core ccx13 and two-core ccx23 instances) run single-app, closed-loop workloads with logging off and a patched Rust listener (somaxconn). Results show the Kotlin JVM often matched or exceeded the Rust port: for example on one core at 1 connection JVM = 2,810 rps vs Rust = 2,379 rps, and across many connection levels the JVM measured roughly 105-127% of Rust throughput; the GraalVM native image trailed somewhat but remained competitive. The writeup argues these numbers reflect attention to port and architecture as much as language semantics, demonstrating that a garbage-collected JVM implementation can keep up with a carefully tuned Rust port under equivalent conditions.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.