Rustc: How I Learned to Respect the Compiler
summary
Solana processes ~300–350 million transactions daily with global consensus under 300 ms and tiny fees, and performance pain points come from LLVM BPF generating eight loads and stores for an 8‑byte copy. The fix uses libcalls via compiler-builtins overrides and targeted LLVM PRs to enable unaligned read codegen instead of forking the toolchain, yielding platform-optimal bytecode. The toolchain also compiles MIR to R1CS with a custom rustc driver to produce Groth16 proofs via zark (zark.gg), enabling one-time KYC proofs without leaking personal data.
AI-written summary · about
related talks
23m"The Current State and Future of Rust Compiler Performance"
32mrustc in userland
11mLightning talk: Rust in blockchain. How Rust powers Solana
32mBuilding and Maintaining Rust at Scale
40mRust’s approach of getting things right
28mRust on Morello
16mHacking rustc: Contributing to the Compiler
56mReady for Rust
