Bend HTTP Server
An HTTP/1.1 server in Bend 2 with concurrent connection handling and routes that demonstrate CPU-parallel and GPU-dispatched computation. Health and runtime-information endpoints make the example easy to inspect.
Request parsing and routing are separated from socket effects, while LAWS.bend and PROOF.bend express equivalence properties for the compute paths. Native compilation enables the multicore/GPU execution paths; the JavaScript development backend remains single-threaded. A focused server experiment rather than a full web framework.
Before you run this HTTP server
Built with Bend checked source revision 66a9258 with Bend 2.0.35 on . It needs compatibility work before it can run with that compiler.
bend main.bend --check-only stops at TCP.listen(port()) in the server entry point: the checker expects a string but receives a U32. The Bend 2.0.35 guide specifies TCP.listen(host, port). This is the first failure, not a verified one-line fix.
The separate bend PROOF.bend --verdict check passes. Those laws cover the computation and its bound, not socket behavior, HTTP correctness, or a successful server build. We did not run or benchmark the server, test GPU execution, or establish compatibility with other compiler versions.
For source study, follow request parsing into routing and response formatting, then compare the stated laws with the socket-handling code.
The sources
Explore the original posts and links behind this build.
GitHubhttps://github.com/iamsahilsonawane/bend2-http-server/blob/main/README.md ↗GitHubhttps://github.com/iamsahilsonawane/bend2-http-server/blob/main/src/server… ↗Try a smaller, local HTTP example
The official Bend 2.0.35 HTTP demo is a separate starting point, not a fix for the project above. Built with Bend compiled that unmodified demo and received one HTTP 200 response with a Hello, world! body on .
From that version’s compiler repository, build with bend demos/io_http_server/main.bend -o http_server, run ./http_server --threads 1, then request http://127.0.0.1:8080/ from another terminal. Stop the process when finished. It binds only to the local machine and returns a fixed page; it does not provide the listed project’s routes or GPU workload.
This was one local smoke check, not a benchmark or production-readiness test. The demo’s check-only and proof commands, including --verdict, rejected unsafe or foreign-code dependencies on that compiler. A running HTTP response is not a passing proof.