feat!: server takes the host to bind; bend 2.0.34 - #17
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.bendreach the wire effect (foreign C/JS). So:auth.bend(pure bearer/basic) andwirespec.bend(pure wire spec) hold the pure helpers;client.bendandwire.benddelegate under their old names.LAWS.bend/PROOF.bendimport only pure modules:ALL PROOFS CHECK.ENTRY.bend. Its verdict isSOME PROOFS FAIL, and the only error is the foreign-code list.checks.proofsenforces that (a false law there fails the check).Other changes
ez.mkProofsreplaced by the runCommand proofs check.nix flake checkpasses (proofs, lint, http-compare 43/43).🤖 Generated with Claude Code