Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
658464c
Add uWebZockets (Zig) framework entry
Coder-Blue Oct 8, 2026
f4ef01e
uWebZockets: lowercase the entry directory for the Docker tag
Coder-Blue Oct 8, 2026
ac844c3
uWebZockets: make the entrypoint executable in the runtime image
Coder-Blue Oct 8, 2026
bd2bb80
uWebZockets: single-file entry, dev log off
Coder-Blue Oct 8, 2026
6b97075
uWebZockets: start the h1 listener after the TLS/QUIC listeners
Coder-Blue Oct 8, 2026
46ba0eb
uWebZockets: drop source comments
Coder-Blue Oct 8, 2026
6b8a370
uWebZockets: run all four listeners in one process
Coder-Blue Oct 8, 2026
33b950a
uwebzockets: delay httpMode startup by 3s to allow other listeners to…
Coder-Blue Oct 9, 2026
c482527
chore(uwebzockets): delay h2c, tls, h3 to let http bind first
Coder-Blue Oct 9, 2026
c7c7c12
chore(uwebzockets): replace initialization sleep with a deterministic…
Coder-Blue Oct 9, 2026
f7c3954
Benchmark results: uwebzockets [skip ci]
github-actions[bot] Oct 9, 2026
f4fb26a
Merge branch 'main' into uwebzockets
Coder-Blue Oct 12, 2026
f6760f3
chore(uwebzockets): mark framework type as experimental in meta.json
Coder-Blue Oct 12, 2026
f712eea
Merge branch 'main' into uwebzockets
Coder-Blue Oct 12, 2026
a85dd58
Merge branch 'main' into uwebzockets
Coder-Blue Oct 13, 2026
ce6e88a
Benchmark results: uwebzockets [skip ci]
github-actions[bot] Oct 14, 2026
811bfe4
Fix uwebzockets benchmark validation and CPU usage
Coder-Blue Oct 14, 2026
8e70295
Merge branch 'main' into uwebzockets
Coder-Blue Oct 14, 2026
00d08d5
Merge branch 'main' into uwebzockets
Coder-Blue Oct 14, 2026
1b52128
Benchmark results: uwebzockets [skip ci]
github-actions[bot] Oct 14, 2026
ad24a4a
chore(uwebzockets): correct CPU scheduling metadata
Coder-Blue Oct 14, 2026
c12e7b2
chore(uwebzockets): defer TLS H2 benchmark
Coder-Blue Oct 14, 2026
9f141fd
chore(uwebzockets): remove deferred H2 listener
Coder-Blue Oct 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frameworks/uwebzockets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.zig-cache
zig-out
zig-pkg
39 changes: 39 additions & 0 deletions frameworks/uwebzockets/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# syntax=docker/dockerfile:1.7

FROM alpine:3.20 AS build
ARG TARGETARCH
ARG ZIG_VERSION=0.16.0
# lsquic, pulled by uWebZockets for HTTP/3, includes <sys/queue.h>.
# Alpine supplies that path through bsd-compat-headers.
RUN apk add --no-cache bsd-compat-headers ca-certificates curl git xz

WORKDIR /server
RUN set -eu; \
case "${TARGETARCH:-amd64}" in \
amd64) ZIG_ARCH=x86_64 ;; \
arm64) ZIG_ARCH=aarch64 ;; \
*) echo "unsupported arch: ${TARGETARCH}" >&2; exit 1 ;; \
esac; \
curl -fSL -m 300 "https://ziglang.org/download/${ZIG_VERSION}/zig-${ZIG_ARCH}-linux-${ZIG_VERSION}.tar.xz" \
| tar -xJ -C /opt; \
mv "/opt/zig-${ZIG_ARCH}-linux-${ZIG_VERSION}" /opt/zig
ENV PATH="/opt/zig:${PATH}"

COPY build.zig build.zig.zon ./
COPY src ./src

RUN set -eu; \
case "${TARGETARCH:-amd64}" in \
amd64) ZIG_TARGET=x86_64-linux-musl; ZIG_CPU=x86_64_v3+aes+pclmul+adx ;; \
arm64) ZIG_TARGET=aarch64-linux-musl; ZIG_CPU=baseline ;; \
esac; \
zig build \
-Dtarget="${ZIG_TARGET}" \
-Dcpu="${ZIG_CPU}" \
--release=fast \
--summary failures

FROM alpine:3.20
COPY --from=build /server/zig-out/bin/uwebzockets /srv/uwebzockets
EXPOSE 8080 8081 8082 8443 8443/udp
ENTRYPOINT ["/srv/uwebzockets"]
20 changes: 20 additions & 0 deletions frameworks/uwebzockets/build.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const std = @import("std");

pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseFast });

const uz = b.dependency("uWebZockets", .{ .target = target, .optimize = optimize });

const exe = b.addExecutable(.{
.name = "uwebzockets",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.strip = true,
}),
});
exe.root_module.addImport("uWebZockets", uz.module("uWebZockets"));
b.installArtifact(exe);
}
13 changes: 13 additions & 0 deletions frameworks/uwebzockets/build.zig.zon
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.{
.name = .uwebzockets_arena,
.version = "0.0.0",
.fingerprint = 0xa939cd74d1827fbb,
.minimum_zig_version = "0.16.0",
.dependencies = .{
.uWebZockets = .{
.url = "git+https://github.com/farbenbuilds/uWebZockets?ref=v1.8.0#d94b4e546000455f2ca680d07cb61d032034d5ec",
.hash = "uWebZockets-1.8.0-SD3SPCtoJgB2t5E5ldRsnhw2iSXJXaEU03GScHvbL_8s",
},
},
.paths = .{""},
}
36 changes: 36 additions & 0 deletions frameworks/uwebzockets/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"display_name": "uWebZockets",
"language": "Zig",
"type": "experimental",
"mode": "standard",
"engine": "libxev",
"completeness": {
"routing": true,
"middleware": true,
"request": true,
"response": true
},
"description": "Zero-allocation, shared-nothing Zig 0.16 framework: a typed Request/Response API over HTTP/1.1, HTTP/2, HTTP/3, WebSocket and JSON-RPC, served from bounded startup slabs. Each cluster worker runs its own libxev loop; the kernel schedules workers across the benchmark's assigned logical CPUs. BoringSSL, lsquic and libdeflate are compiled in. Standard configuration, no tuning.",
"repo": "https://github.com/farbenbuilds/uWebZockets",
"enabled": true,
"tests": [
"baseline",
"pipelined",
"limited-conn",
"json-comp",
"json-tls",
"baseline-h2c",
"json-h2c",
"baseline-h3",
"echo-ws",
"echo-ws-pipeline",
"echo-ws-limited",
"latency-1m",
"latency-10k",
"latency-500k-8cpu"
],
"maintainers": [
"farbenbuilds",
"Coder-Blue"
]
}
Loading
Loading