API Reference Gale v#0.1.1

Copy Markdown View Source

Modules

Drop-in HTTP/1.1 + HTTP/2 + HTTP/3 for Phoenix, Bandit, Finch, Req, Cowboy, and hackney.

Fresh Elixir/HTTP server implementations for benchmarking. Pure Elixir, NIF-accelerated, and comparison against Bandit/Cowboy.

Standalone CLI (gale) and Mix task (mix gale).

Drop-in for Plug.Cowboy.http/3 / https/3. Adds alt-svc on the plug.

Pure-Elixir QPACK static encoder (same rules as the Zig NIF) for benches.

Drop-in for Finch. Same start_link/1 and request/3; HTTP/3 when the request URL uses https and protocols: [:http3] is in Finch pool config or request opts.

Drop-in HTTP client for Req / Finch / hackney / Mint-style calls.

Drop-in for :hackney. HTTP/3 is opt-in with protocols: [:http3 | ...] (hackney 4.x) or via Gale.HTTP.

Zig NIF entry points. Prefer Gale.qpack_encode/1 and friends.

Phoenix endpoint adapter: HTTP/1.1 + HTTP/2 (Bandit) and HTTP/3 (QUIC).

Plug adapter for Gale HTTP/1.1, HTTP/2, and HTTP/3.

Plug/Phoenix integration surface for HTTP/3 advertising, next to Bandit.

Injects alt-svc: h3=":port" on every Plug response.

Drop-in for Req. Gale.Req.get/2 is Req.get/2. Pass protocols: [:http3] to force HTTP/3 via Gale.HTTP.

Drop-in for Bandit.start_link/1 / {Bandit, opts}.

Content-addressed blobs: BLAKE3 identity, XXH3 fast checksum.

S5-style blob CID: 0x5b 0x82 0x1e + BLAKE3-256 + unsigned LEB128 size.

S3 PUT/GET with optional AWS SigV4. BLAKE3 stored as x-amz-meta-blake3.

S5 blob client. Content-addressed with BLAKE3; HTTP to an S5 node.

Runtime probe of BEAM HTTP/QUIC/H3 packages (see ECOSYSTEM.md).

Mix Tasks

Gale CLI. Same as the gale escript.

Build a Burrito single-file CLI (ERTS inside). Needs zig + xz.

Install gale: Burrito single binary if possible, else escript.

Configures a Phoenix endpoint to use Gale for HTTP/1.1, HTTP/2, and HTTP/3.