v0.8.0
flare v0.8.0
A protocol-surface release: flare gains a sans-I/O QUIC v1 + HTTP/3
stack, a gRPC unary server, HTTP caching and reliability
middleware, and a full migration to the Mojo 1.0.0b2 toolchain. 214
commits since v0.7.0.
QUIC v1 (sans-I/O core + reactor)
- Wire codecs: variable-length integers (RFC 9000 §16), long/short
packet headers (§17), transport-frame codec (§19), and transport
parameters (§18). - State machines: per-stream (§3) and per-connection (§10) lifecycle in
flare.quic.state. - Crypto: pluggable
QuicCryptotrait with RFC 9001 initial-secret
math and anOpenSslQuicCryptoproduction backend — AEAD
(RFC 9001 §5.3) and header-protection mask (§5.4) via dedicated
flare_quic_aead_*/flare_quic_hp_maskFFI thunks. - Server I/O: UDP-listener bind with per-datagram dispatch,
QuicConnection.handle_packetwired end-to-end, and a PTO / idle /
ack-delayTimerWheel. - Optional rustls QUIC backend: a
rustls_wrapperRust crate +
build_rustls.sh, FFI binding, and live-fire handshake fixtures
(incl. miri). - Coverage: loopback integration plus handshake/CID and crypto fuzz
harnesses; RFC 9001 Appendix A conformance vectors.
HTTP/3 + QPACK
- Frame codec + SETTINGS payload (RFC 9114 §7).
- Sans-I/O drivers:
H3Connection, a request-stream reader state
machine, and a response-stream writer. - Server path: peer uni-stream dispatch, SETTINGS/GOAWAY consumption,
and thefeed_stream_chunk -> take_request -> emit_response -> take_response_framesloop. - QPACK static-table encoder/decoder (RFC 9204).
- Conformance round-trip suite +
fuzz_h3_server(200K execs).
ALPN protocol routing
- Wire-protocol routing decision layer;
http.server.bind_with_h3
opens the UDP listener and routes by ALPN; ALPN-driven WebSocket
dispatch (WsClient.connect_prefer_h2, auto-client wire dispatcher).
gRPC (unary)
- LPM framing codec + canonical status codes;
GrpcServerAdapter
bridges unary RPCs over HTTP/2. - Typed surface:
GrpcRequestHeaders,GrpcUnaryReplywith ok/err
factories;grpc-status-details-binbase64 trailers; binary/text
metadata key discipline. - Hardening:
run_unary_callnever raises (errors map to typed
outcomes), case-insensitivete: trailers,fuzz_grpc_lpm_decoder.
HTTP caching & middleware
- RFC 9111
Cache-Controldirective parser + bounded store; a
Cache[Inner, S]middleware with two-levelVarylookup and
is_freshfreshness checks. Retry+Timeoutreliability middleware (RFC 9110-aligned backoff).H1LeniencyConfignamed relaxation flags wired into the H1 parser.
WebSocket
- permessage-deflate context-takeover (persistent LZ77 across
messages). - RFC 6455 §5 conformance fixture corpus + runner; forked-server I/O
round-trip suite.
Developer surface
- Template inheritance:
{% block %}/{% extends %}. - OpenAPI 3.1 spec model + deterministic JSON emitter.
TestClient[H]for in-process handler exercises.
Performance
- HPACK Huffman: table-driven decoder, 3.6x-4.2x over the scalar
path. - One-pass exact-length response serialization; per-header
to_lowercaseallocation removed; UTF-8 validation bypassed on the
H1 parse hot path. - No regression vs Go
net/httpand nginx (single-worker) or
hyper/axum/actix-web (multi-worker); per-percentile sigma published in
docs/benchmark.md.
Correctness & hardening
- HTTP client: reject 16-digit chunk-size to stop a signed-
Int
overflow driving an out-of-bounds read in the chunked decoder. - HTTP parser: sanitize unvalidated request-line bytes before echoing
them in error messages. - TLS FFI: keep owned path/SNI buffers live across OpenSSL calls;
NUL-terminate cert/key/CA paths; install the rustls QUIC cdylib as
.dylibon macOS. - Auth: forward caller-supplied
Authorizationon H1 and h2c-upgrade
paths (needed for S3 / AWS SigV4). - io_uring: size SQE/CQE mmaps from the entry count, not the
ring-entries offset. - HTTP/2: stop
take_completed_streamsre-dispatching already-served
streams; stream slab keyed onstream_idwith a fast-path table. - New fuzz harnesses across quic (varint, long-header,
transport_params), qpack, h3 (frame), grpc, and cache-control; h1
wire-grammar conformance corpus.
Structure (v0.8 decomposition)
- A 1000-line-per-module bar enforced by
tools/check_reactor_size.sh. Split the server reactor into epoll +
uring modules, relocated unified-reactor dispatch, extracted client
parse/send, the io_uring ABI codec, quic/http2 value types, and the
extractor parsers. - Lifecycle: migrated
__copyinit__/__moveinit__to__init__
overloads; removed stub-only public surfaces and a stale
prelude.mojoshadow.
Mojo 1.0.0b2 migration
reflect[T]alias form, non-nullableUnsafePointer,
MutExternalOrigin->MutUntrackedOrigin, andStringSlice
construction viaCStringSlice.- Dependencies pinned to json v0.2.1 and mozz v0.1.4; quiche
baseline bumped 0.22.0 -> 0.24.5.