quiche / datagram-socket
AGENTS.md13k starsChanged 2 months agoBSD-2-ClauseView on GitHub
UDP socket abstraction layer shared across the quiche workspace. Two main concerns: DgramBuffer (a headroom-aware zero-copy byte buffer for datagrams) and DatagramSocket* traits (uniform async send/recv over UdpSocket/UnixDatagram with Linux recvmmsg/sendmmsg batching). Wraps a Vec<u8> with a pos cursor dividing it into [headroom: 0..pos][payload: pos..]. as_slice() / len() expose only the payload. BufMut writes append to the tail, independent of pos. Fast path: allocate with with_capacity_and_headroom, fill payload via BufMut, call try_add_prefix to slide pos left and write the prefix…
Trending
Less talk lately.about the whole repository
Who's talking about cloudflare/quiche
- A Hacker News story“Quiche – An implementation of the QUIC transport protocol in Rust”Hacker News · Jan 28, 2019 · 177 points
- kubernetes/ingress-nginx“[FEATURE REQUEST] HTTP/3 support”GitHub · Nov 19, 2019 · 97 reactions
- ducaale/xh“Support HTTP/3”GitHub · Feb 7, 2021 · 11 reactions
- ninenines/cowboy“QUIC and HTTP/3”GitHub · Nov 2, 2021 · 10 reactions
- linkerd/linkerd2“HTTP3 / QUIC support”GitHub · Jul 6, 2020 · 9 reactions
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
- Dec 9, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★11016 https://github.com/cloudflare/quiche — @rusttrending.bsky.social7 likes and reposts
- Jun 6, 2026cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★11541 https://github.com/cloudflare/quiche — @rusttrending.bsky.social5 likes and reposts
- May 14, 2026cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★11466 https://github.com/cloudflare/quiche — @rusttrending.bsky.social4 likes and reposts
- Feb 27, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9899 https://github.com/cloudflare/quiche — @rusttrending.bsky.social3 likes and reposts
- Oct 5, 2026cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★12743 https://github.com/cloudflare/quiche — @rusttrending.bsky.social2 likes and reposts
22 more on Bluesky
- Jul 16, 2026Il est pas si loin, quiche est l'implémentation de QUIC chez Cloudflare 😋 => github.com/cloudflare/q... — @lcheylus.bsky.social2 likes and reposts · 1 reply
- Oct 26, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★10668 https://github.com/cloudflare/quiche — @rusttrending.bsky.social2 likes and reposts
- May 16, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★10150 https://github.com/cloudflare/quiche — @rusttrending.bsky.social2 likes and reposts
- Apr 29, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★10096 https://github.com/cloudflare/quiche — @rusttrending.bsky.social2 likes and reposts
- Apr 5, 2025🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 github.com/cloudflare/q... — @diegopacheco.bsky.social2 likes and reposts
- Jan 31, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9814 https://github.com/cloudflare/quiche — @rusttrending.bsky.social2 likes and reposts
- Nov 22, 2024cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9493 https://github.com/cloudflare/quiche — @rusttrending.bsky.social2 likes and reposts
- Oct 7, 2023cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★8082 https://github.com/cloudflare/quiche — @rusttrending.bsky.social2 likes and reposts · 1 reply
- Sep 23, 2026📦 cloudflare / quiche ⭐ 12,523 (+49) 🗒 Rust 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 — @github-trending-rs.bsky.social1 likes and repost
- Apr 24, 2026cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★11418 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Jan 31, 2026cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★11198 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Dec 26, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★11068 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Aug 1, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★10395 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Jul 11, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★10325 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Apr 11, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★10039 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Mar 25, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9963 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Feb 13, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9844 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Dec 22, 2024cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9564 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Nov 20, 2024cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9486 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Nov 1, 2024cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9444 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Aug 15, 2024cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★9208 https://github.com/cloudflare/quiche — @rusttrending.bsky.social1 likes and repost
- Nov 24, 2025cloudflare / quiche: 🥧 Savoury implementation of the QUIC transport protocol and HTTP/3 ★10926 https://github.com/cloudflare/quiche — @rusttrending.bsky.social0 likes and reposts · 1 reply
On GitHub · 23
- Nov 19, 2019[FEATURE REQUEST] HTTP/3 support — kubernetes/ingress-nginx97 reactions · 55 comments
- Feb 7, 2021Support HTTP/3 — ducaale/xh11 reactions · 7 comments
- Nov 2, 2021QUIC and HTTP/3 — ninenines/cowboy10 reactions · 24 comments
- Jul 6, 2020HTTP3 / QUIC support — linkerd/linkerd29 reactions · 14 comments
- Nov 18, 2019add experimental quic to testing, nginx 1.17 — openresty/openrestysays it tested it9 reactions · 5 comments
18 more on GitHub
- Feb 28, 2024HTTP3 for sinks — vectordotdev/vector7 reactions
- Apr 11, 2021Lets add http/3 support — just-js/just7 reactions · 31 comments
- Mar 28, 2025DoH3 support — t895/DNSNet5 reactions · 3 comments
- Mar 16, 2020ICE when building docopt with rustc nightly on Travis CI — rust-lang/rust5 reactions · 8 comments
- Sep 17, 2025QUIC / HTTP3 support — pingooio/pingoo4 reactions · 2 comments
- Feb 21, 2022feat: apisix support QUIC+HTTP3 — apache/apisix4 reactions · 24 comments
- Oct 14, 2025DoH3 support — hufrea/byedpi3 reactions
- Dec 16, 2021HTTP/3 Tutorial: curl installation instructions do not work — cloudflare/cloudflare-docs3 reactions · 10 comments
- May 18, 2021Prepare for connection migration support — netty/netty-incubator-codec-quic3 reactions · 1 comment
- Apr 6, 2021curl formula fails on MacBook Pro M1 running macOS Big Sur 11.2.3, using Homebrew 3.0.11 — cloudflare/homebrew-cloudflare3 reactions · 9 comments
- Jul 20, 2026build(deps): bump the rust-dependencies group with 33 updates — Nil-VPN/nil2 reactions · 2 comments
- Dec 16, 2024Remove direct `Instant::now()` calls — Tencent/tquic2 reactions · 1 comment
- Mar 22, 2023curl HTTP/3 with quiche discouraged — curl/curl2 reactions · 9 comments
- Sep 19, 2022rgw: h3 frontend based on quiche library — ceph/ceph2 reactions · 39 comments
- May 8, 2022QUIC plugin system — feather-rs/feather2 reactions · 1 comment
- Jan 29, 2021limiting a burst of outgoing packets — netty/netty-incubator-codec-quic2 reactions · 1 comment
- May 18, 2020with quiche nginx not work — apache/incubator-pagespeed-ngx2 reactions · 23 comments
- Dec 30, 2019Support building libsignal-protocol-c for Android and iOS — whisperfish/libsignal-protocol-rs2 reactions · 2 comments
On Hacker News · 4
- Jan 28, 2019Quiche – An implementation of the QUIC transport protocol in Rust177 points · 27 comments
- Jan 26, 2019Cloudflare/quiche: Savoury implementation of the QUIC transport protocol3 points
- Jan 23, 2019Quiche: QUIC implementation in Rust2 points
- May 11, 2021Quiche: Savoury implementation of the QUIC transport protocol and HTTP/31 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- h3i/AGENTS.mdAGENTS.md
- qlog/AGENTS.mdAGENTS.md
- qlog-dancer/AGENTS.mdAGENTS.md
- quiche/AGENTS.mdAGENTS.md
- quiche/src/h3/AGENTS.mdAGENTS.md
- quiche/src/recovery/AGENTS.mdAGENTS.md
- tokio-quiche/AGENTS.mdAGENTS.md
- tokio-quiche/src/http3/driver/AGENTS.mdAGENTS.md
- tokio-quiche/src/quic/AGENTS.mdAGENTS.md
- quiche-draft-releaseSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Slow path: if no headroom was pre-allocated, splice_headroom(n) does an O(payload_len) memmove to insert n bytes at the front.
- Very specific: line 42
splice_headroomis O(n): Prefer pre-allocated headroom via with_capacity_and_headroom on hot paths. - Very specific: line 48
No feature flags — platform-gating via #[cfg(target_os = "linux")] and #[cfg(unix)].
≈ “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.
Files
datagram-socket/
UDP socket abstraction layer shared across the quiche workspace. Two main concerns:
DgramBuffer (a headroom-aware zero-copy byte buffer for datagrams) and
DatagramSocket* traits (uniform async send/recv over UdpSocket/UnixDatagram
with Linux recvmmsg/sendmmsg batching).
STRUCTURE
src/
lib.rs Re-exports, is_nonblocking() helper
buffer.rs DgramBuffer — headroom-aware buffer for zero-copy datagram handling
datagram.rs DatagramSocket/Send/Recv traits, MaybeConnectedSocket, MAX_DATAGRAM_SIZE
mmsg.rs recvmmsg/sendmmsg + poll_recvmmsg!/poll_sendmmsg! macros (Linux only)
shutdown.rs ShutdownConnection trait
socket_stats.rs SocketStats, QuicAuditStats, AsSocketStatsWHERE TO LOOK
| Task | File | Notes |
| Prepend a flow ID to an outbound datagram | buffer.rs | try_add_prefix (fast, zero-copy) or splice_headroom + retry (slow, O(n)) |
| Strip a prefix from an inbound datagram | buffer.rs | advance(n) — zero copy |
| Implement a new socket type | datagram.rs | Implement DatagramSocketSend + DatagramSocketRecv; DatagramSocket is automatic |
| Batch recv/send on Linux | mmsg.rs | Use poll_recvmmsg! / poll_sendmmsg! macros; sendmmsg_with_suffix appends shared framing to every message |
| Track connection-level metrics | socket_stats.rs | QuicAuditStats (atomic/lock-protected); SocketStats (plain Copy struct) |
DgramBuffer DESIGN
Wraps a Vec<u8> with a pos cursor dividing it into [headroom: 0..pos][payload: pos..]. as_slice() / len() expose only the payload. BufMut writes append to the tail, independent of pos.
Fast path: allocate with with_capacity_and_headroom, fill payload via BufMut, call try_add_prefix to slide pos left and write the prefix into headroom — no allocation, no memmove.
Slow path: if no headroom was pre-allocated, splice_headroom(n) does an O(payload_len) memmove to insert n bytes at the front; then retry try_add_prefix.
Stripping a prefix: advance(n) increments pos — zero-copy.
ANTI-PATTERNS
splice_headroomis O(n). Prefer pre-allocated headroom viawith_capacity_and_headroomon hot paths.MaybeConnectedSocketsnapshots connectedness at construction. If the underlying socket's connected state changes after wrapping, the routing behavior will be stale.recvmmsg/sendmmsgassume a connected socket (nomsg_name). Do not use on unconnected sockets.
NOTES
- No feature flags — platform-gating via
#[cfg(target_os = "linux")]and#[cfg(unix)]. tokio-quichesetstype DgramBuf = DgramBufferin itsBufFactoryimpl, so all QUIC DATAGRAMs flowing throughquiche::Connectionin tokio-quiche areDgramBufferinstances.- In
quicheitself,BufFactory::DgramBufdefaults toVec<u8>—DgramBufferis only used when tokio-quiche'sBufFactoryis active. DGRAM_HEADROOM = 16intokio-quiche/src/buf_factory.rs— sized to hold two QUIC varints (max 8 bytes each).MAX_DATAGRAM_SIZE = 1500bytes.- The send implementation fully populates its
libc::iovecstorage before taking anymmsghdr.msg_iovpointers. Do not interleave pushes and pointer creation: aSmallVecreallocation would leave pointers for earlier messages dangling across the syscall. unsafe impl BufMut for DgramBufferdelegates entirely toVec<u8>'s trusted implementation;posandBufMut's write pointer operate on non-overlapping regions.
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
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.

