Rewrite everything in Rust? What we learned from introducing Rust in Strawberry-GraphQL
summary
Strawberry moves parsing and validation into Rust via a new library Rasberry, using Apollo Rust for validation and a shared GraphQL AST as the interface. Parsing and validation speed improves up to 7× and small queries run ~4.5× faster in end-to-end benchmarks. Two integration patterns are compared: mirror types (fast to construct, 20% better on large ASTs) versus instantiating Python types (lower runtime access overhead). Async callback overhead and Python–Rust crossings limit gains so migration proceeds incrementally on CPU‑bound subsystems with continuous benchmarking.
AI-written summary · about
chapters (11)
- 0:00Introduction to strawberry
- 0:32Understanding graphql
- 1:24Graphql schema design
- 2:08Query execution basics
- 3:03Python ecosystem overview
- 3:39Strawberry implementation
- 4:24Performance challenges
- 9:53Integrating rust with python
- 11:11Data mapping strategies
- 14:47Benchmarking and results
- 20:21Future steps and Q&A
related talks
38mWriting a GraphQL compiler in Rust, a case study
40mRust’s approach of getting things right
06mGraphQL tooling in Rust
23mWas It Worth It? Lessons from Implementing Two GraphQL Routers. In JavaScript & Rust
21mExtending the horizons of R with Rust
53mRust: Reach Further!
46mAdopting Rust by gracefully oxidising web applications
46mRust for Rubyists
