I ported h2spec to Rust (also: codegen!)
To try everything Brilliant has to offer—free—for a full 30 days, visit https://brilliant.org/fasterthanlime. You’ll also get 20% off an annual premium subscription.
fluke on GitHub: https://github.com/bearcove/fluke
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/rfc9113.html
cargo-nextest: https://nexte.st
HTTP request smuggling: https://portswigger.net/web-security/request-smuggling
io_uring: https://en.wikipedia.org/wiki/Io_uring
kTLS (in-kernel TLS): https://www.kernel.org/doc/html/latest/networking/tls.html
Procedural Macros in the Rust Reference: https://doc.rust-lang.org/reference/procedural-macros.html
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-speaking-at-rustconf-2023
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/http2#Framer.ReadFrame
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-want-off-mr-golangs-wild-ride
Aiming for correctness with types: https://fasterthanli.me/articles/aiming-for-correctness-with-types
Lies we tell ourselves to keep using Golang: https://fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang
proc macros as WASM blobs: https://crates.io/crates/watt
rustdoc JSON output: https://doc.rust-lang.org/rustdoc/unstable-features.html#json-output
Bootstrapping the Rust compiler: https://rustc-dev-guide.rust-lang.org/building/bootstrapping/what-bootstrapping-does.html
rustdoc serde-ish types: https://crates.io/crates/rustdoc-types
lint your crate API changes for semver violations: https://crates.io/crates/cargo-semver-checks
git hooks for Rust projects: https://crates.io/crates/cargo-husky
cargo build scripts: https://doc.rust-lang.org/cargo/reference/build-scripts.html
This video was sponsored by Brilliant.
If you liked what you saw, please support my work!