Skip to content

feat!: server takes the host to bind; bend 2.0.34 - #17

Merged
noah-emp merged 1 commit into
mainfrom
feat/bend-2.0.34
Sep 29, 2026
Merged

noah-emp merged 1 commit into
mainfrom
feat/bend-2.0.34

Conversation

@noah-emp

Copy link
Copy Markdown
Collaborator

Ports ezhttp to bend 2.0.34.

Breaking: the server takes a host

Bend 2.0.32 made TCP.listen(host, port) take the address to bind. ezhttp mirrors it:

  • http.serve(handle, host: String, port: U32, limit: U32)
  • http.serve_once(handle, host: String, port: U32)
  • server.listen(host, port), server.serve(handle, host, port, limit), server.once(handle, host, port)

README examples use "127.0.0.1". ezhttp now needs bend 2.0.32+.

Proofs under 2.0.32's verdict

The verdict counts every def of every import, and main.bend/client.bend reach the wire effect (foreign C/JS). So:

  • auth.bend (pure bearer/basic) and wirespec.bend (pure wire spec) hold the pure helpers; client.bend and wire.bend delegate under their old names.
  • LAWS.bend/PROOF.bend import only pure modules: ALL PROOFS CHECK.
  • The 19 identity laws on the entry's re-exports and client helpers move, unchanged, to ENTRY.bend. Its verdict is SOME PROOFS FAIL, and the only error is the foreign-code list. checks.proofs enforces that (a false law there fails the check).

Other changes

  • Flake: bend pinned at 777ee0b (2.0.34); ez's bend pinned at af569d4 (2.0.31); ez.mkProofs replaced by the runCommand proofs check.
  • bolt tool v1.8.0 -> v1.9.0 (v1.8.0 does not build on 2.0.31, the version ezaudio uses).
  • bench: drops argv[0], binds 127.0.0.1.
  • nix flake check passes (proofs, lint, http-compare 43/43).

🤖 Generated with Claude Code

Bend 2.0.32 made TCP.listen take the address to bind, so the server now
takes a host before the port, as bend does:

  http.serve(handle, host: String, port: U32, limit: U32)
  http.serve_once(handle, host: String, port: U32)
  server.listen(host: String, port: U32)
  server.serve(handle, host, port, limit)
  server.once(handle, host, port)

2.0.32's verdict covers every def of every import, and main.bend and
client.bend reach the wire effect, so PROOF.bend no longer imports them:
the pure header helpers move to auth.bend and the wire spec to
wirespec.bend (client.bend and wire.bend delegate, same names), LAWS.bend
states their laws there, and the laws on the entry's re-exports move to
ENTRY.bend. PROOF.bend prints ALL PROOFS CHECK; ENTRY.bend's only error
is the foreign-code list, and checks.proofs holds both to that.

The flake pins bend at 777ee0b (2.0.34); ez stays on its own bend
(2.0.31) with bolt v1.9.0, which builds there. The bench driver drops the
program name IO.args now puts first, and binds 127.0.0.1.

BREAKING CHANGE: http.serve and http.serve_once (and server.listen,
server.serve, server.once) take `host: String` before `port`, the address
to bind, e.g. "127.0.0.1" for loopback or "0.0.0.0" for every interface.
Replace `http.serve(handle, 8080, n)` with
`http.serve(handle, "127.0.0.1", 8080, n)`. ezhttp now needs bend 2.0.32
or later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noah-emp
noah-emp enabled auto-merge (squash) September 29, 2026 23:50
@noah-emp
noah-emp merged commit f7158f9 into main Sep 29, 2026
1 check passed
@noah-emp
noah-emp deleted the feat/bend-2.0.34 branch September 29, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants