Repository navigation
Add uWebZockets (Zig) framework entry - #1536
Open
Coder-Blue wants to merge 12 commits into
Open
Coder-Blue wants to merge 12 commits into
Coder-Blue wants to merge 12 commits into
Conversation
Zero-allocation shared-nothing Zig framework on libxev, serving HTTP/1.1, HTTP/2, HTTP/3 and WebSocket from bounded startup slabs. Standard configuration: plaintext clusters for h1/WS and h2c, single TLS listeners for json-tls, baseline-h2 and baseline-h3.
Coder-Blue
requested review from
Kaliumhexacyanoferrat and
MDA2AV
as code owners
October 8, 2026 18:21
Flatten handlers/shared into src/main.zig to match the nilo/dusty layout and set enable_dev_log=false in the cluster configs.
Bringing all four listeners up together resets the first connections served on 8080 under startup contention; starting http last avoids the window.
Each listener is a thread in the same binary, so entrypoint.sh is gone.
Author
|
/benchmark -f uwebzockets --save |
Contributor
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Owner
|
Yo, can you check validations issues before I benchmark? |
Author
Oh, sure. I'm on it. |
Coder-Blue
force-pushed
the
uwebzockets
branch
from
October 9, 2026 01:29
29db0d0 to
20d54c5
Compare
Author
|
/benchmark -f uwebzockets --save |
Contributor
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Contributor
Benchmark ResultsFramework:
Full log |
Author
|
Uhm, what's up with the yellow caution sign emoji? |
Author
|
@MDA2AV, did the validation issues from earlier disappear? I committed some new changes, but I don't see any workflow approval. |
This branch has not been deployed
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.
Adds uWebZockets — a zero-allocation, shared-nothing Zig framework on libxev with a typed
Request/ResponseAPI. Marked emerging / standard; completeness 4/4 (radix router, middleware pipeline, typed request parsing, response helpers).Profiles: baseline, pipelined, limited-conn, json-comp, json-tls, baseline-h2, baseline-h2c, json-h2c, baseline-h3, echo-ws (+ pipeline and limited) and the three latency profiles.
How it runs: one static binary, four listeners, each on its own thread:
httpon 8080 — plaintext cluster, one libxev loop per coreh2con 8082 — same cluster, h2 prior-knowledgetlson 8081 —init_https(BoringSSL), for json-tlsh3on 8443 tcp+udp —init_http3(lsquic), for baseline-h2 and baseline-h3Worker count adapts to the host (cpus/2, capped at 32). JSON is serialized and gzipped per request with the framework's
std.jsonand libdeflate stream — nothing pre-rendered — and the WebSocket echo usesapp.wswith default buffers.Left out deliberately:
8gbit,static-h2,static-h3andstatic-tls. In 1.8.0 the TLS constructors are fixed to the default config (16 KiB bodies, 64 KiB static buffer), so the 100 KiB echo validation and the bigger static assets can't be served through them.asynchas no public timer API, and there's no database/template/gRPC/gateway support in the framework.