I ported h2spec to Rust (also: codegen!)
fasterthanlime fasterthanlime
51.7K subscribers
25,494 views
1.4K

 Published On Premiered Jun 10, 2024

To try everything Brilliant has to offer—free—for a full 30 days, visit https://brilliant.org/fasterthanlime ... also get 20% off an annual premium subscription.

Early access: https://fasterthanli.me/videos/h2spec...

Follow me on Mastodon: https://hachyderm.io/@fasterthanlime
Support me on Patreon or GitHub: https://fasterthanli.me/donate

(References continue below)

Contents

00:00 Sponsor disclaimer
00:02 Intro
01:16 Current funding, thanks
01:46 HTTP compliance suites
02:51 "..I decided to port it to Rust"
04:15 Don't repeat yourself
05:02 Sponsored segment
06:16 Codegen in Go
07:11 Rust proc macros
08:44 It's not that simple
11:19 Enter rustdoc
12:23 The whole process
13:24 bindgen & friends
15:17 Outro

References

fluke on GitHub: https://github.com/bearcove/fluke

fly.io on GitHub: https://github.com/superfly
Shopify open source: https://shopify.github.io

h2spec: https://github.com/summerwind/h2spec
hyper: https://crates.io/crates/hyper
The HTTP/2 RFC: https://www.rfc-editor.org/rfc/rfc911...
cargo-nextest: https://nexte.st
HTTP request smuggling: https://portswigger.net/web-security/...
io_uring: https://en.wikipedia.org/wiki/Io_uring
kTLS (in-kernel TLS): https://www.kernel.org/doc/html/lates...
Procedural Macros in the Rust Reference: https://doc.rust-lang.org/reference/p...
the fun kind of discipline: https://bdsmtest.org/
the nom parser combinator library: https://crates.io/crates/nom
the syn parser for proc macros: https://crates.io/crates/syn
What could've been (Rust introspection): https://thephd.dev/i-am-no-longer-spe...
module initialization/teardown functions for Rust (like __attribute__((constructor)) in C/C++): https://crates.io/crates/ctor
Go's http2 implementation doing reference-counting without counting: https://pkg.go.dev/golang.org/x/net/h...
My old programming language, ooc: https://ooc-lang.org
The itch.io desktop app: https://itch.io/app
I want off Mr Golang's wild ride: https://fasterthanli.me/articles/i-wa...
Aiming for correctness with types: https://fasterthanli.me/articles/aimi...
Lies we tell ourselves to keep using Golang: https://fasterthanli.me/articles/lies...
proc macros as WASM blobs: https://crates.io/crates/watt
rustdoc JSON output: https://doc.rust-lang.org/rustdoc/uns...
Bootstrapping the Rust compiler: https://rustc-dev-guide.rust-lang.org...
rustdoc serde-ish types: https://crates.io/crates/rustdoc-types
lint your crate API changes for semver violations: https://crates.io/crates/cargo-semver...
git hooks for Rust projects: https://crates.io/crates/cargo-husky
cargo build scripts: https://doc.rust-lang.org/cargo/refer...

This video was sponsored by Brilliant.

show more

Share/Embed