agentleFS
CloudflareKnown publishercloudflare/quiche/tokio-quiche/AGENTS.md

quiche / tokio-quiche

AGENTS.md13k starsChanged 2 months agoBSD-2-ClauseView on GitHub

Async tokio wrapper for quiche. Spawns per-connection IO worker tasks driven by an ApplicationOverQuic trait. Ships a ready-made H3Driver for HTTP/3. Uses foundations for structured logging (slog), telemetry, and settings.

Trending

Less talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 1 mentionJun 2026: 1 mentionJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/quiche repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/quiche

The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 54

Talked about on Bluesky, GitHub and Hacker News (54 times).

On Bluesky · 27

22 more on Bluesky

On GitHub · 23

18 more on GitHub

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Don't add new ApplicationOverQuic methods without considering the worker loop order (recv -> reads -> writes -> send).

    line 67
  2. Very specific:

    Don't block in wait_for_data — it's polled concurrently with packet recv and timers.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

tokio-quiche

OVERVIEW

Async tokio wrapper for quiche. Spawns per-connection IO worker tasks driven by an ApplicationOverQuic trait. Ships a ready-made H3Driver for HTTP/3. Uses foundations for structured logging (slog), telemetry, and settings.

STRUCTURE

src/
  lib.rs              Re-exports, listen(), capture_quiche_logs()
  buf_factory.rs      BufFactory: wraps quiche::BufFactory; provides MAX_BUF_SIZE constant
  result.rs           BoxError = Box<dyn Error+Send+Sync>, QuicResult<T>
  settings/           ConnectionParams → quiche::Config → h3::Config cascade
  metrics/            Metrics trait (pluggable); DefaultMetrics (foundations Prometheus)
  socket/             Socket<Tx,Rx>, QuicListener, SocketCapabilities (GSO/GRO)
  quic/               connect(), start_listener(), ApplicationOverQuic, IoWorker, router
  http3/              H3Driver<H>, DriverHooks (sealed), client/server controllers

WHERE TO LOOK

TaskLocation
Server entrypointlib.rs — listen(), listen_with_capabilities()
Client entrypointquic/mod.rs — connect(), connect_with_config()
Custom app traitquic/connection/mod.rs:663 — ApplicationOverQuic
H3 driver (main logic)http3/driver/mod.rs — H3Driver<H>
Per-connection IO loopquic/io/worker.rs — IoWorker
Packet routing/demuxquic/router/mod.rs — InboundPacketRouter
Config cascadesettings/config.rs — Config::new()
Metrics interfacemetrics/mod.rs — Metrics trait

CODE MAP

SymbolTypeLocationRole
ApplicationOverQuictraitquic/connection/mod.rsExtension point: connection lifecycle, reads/writes, wait_for_data
H3Driver<H>structhttp3/driver/mod.rsImplements ApplicationOverQuic for HTTP/3
DriverHookssealed traithttp3/driver/hooks.rsClient vs server H3 behavior
IoWorker<Tx,M,S>structquic/io/worker.rsPer-connection state machine (recv -> app -> send)
InboundPacketRouterstructquic/router/mod.rsSole owner of socket recv; routes by DCID
ConnectionAcceptorstructquic/router/acceptor.rsServer RETRY + yields InitialQuicConnection
InitialQuicConnectionstructquic/connection/mod.rsPre-handshake handle; .start(app) spawns worker
QuicConnectionstructquic/connection/mod.rsPost-handshake metadata handle (not the qconn itself)
ConnectionParamsstructsettings/mod.rsQuicSettings + TLS + Hooks + session
Configstruct(crate)settings/config.rsBuilds quiche::Config from ConnectionParams
BufFactorystructbuf_factory.rsWraps quiche::BufFactory; Buf = Bytes
Metricstraitmetrics/mod.rsPluggable telemetry; DefaultMetrics uses foundations
QuicCommandenumquic/connection/mod.rsConnectionClose / Custom / Stats commands
BoxErrortype aliasresult.rsBox<dyn Error + Send + Sync> — deliberate choice, see docstring

CONVENTIONS (crate-specific)

  • Re-exports: pub extern crate quiche, pub use datagram_socket.
  • foundations for logging (slog), not log directly. capture_quiche_logs() bridges quiche's log into slog.
  • DriverHooks is sealed — prevents external H3Driver variants.
  • QuicAuditStats (from datagram-socket) threaded through all connections via Arc.
  • Task spawning via metrics::tokio_task::spawn() / spawn_with_killswitch() — wraps tokio::spawn with optional schedule/poll histograms.
  • ConnectionStage FSM: Handshake -> RunningApplication -> Close.
  • IoWorker drains PathEvents and forwards them directly through ConnectionHook::on_path_event when a hook is configured, avoiding protocol-specific H3 plumbing.

ANTI-PATTERNS

  • connection_not_present() returns TlsFail in driver — misleading sentinel. Don't propagate.
  • Error::Done used as success signal in H3 driver write path. Don't replicate.
  • Don't add new ApplicationOverQuic methods without considering the worker loop order (recv -> reads -> writes -> send).
  • Don't block in wait_for_data — it's polled concurrently with packet recv and timers.

NOTES

  • Hardcodes quiche/boringssl-boring-crate + quiche/qlog in Cargo.toml deps.
  • Features: zero-copy implies gcongestion. rpk enables raw public keys via boring/rpk.
  • --cfg capture_keylogs (build flag, not feature) enables SSLKEYLOGFILE support.
  • perf-quic-listener-metrics adds handshake timing instrumentation.
  • tokio-task-metrics adds schedule/poll duration histograms per spawned task.
  • Linux-only: libc/nix deps for signal handling and socket options.
  • One client connection per socket — no multiplexing on client side.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.