Rust Compile Times: From 25 Minutes to 2 Minutes

The Feldera team encountered excessively long compile times when compiling large SQL-generated Rust code. An 8,562-line SQL program translated to ~100k lines of Rust took 25 minutes to compile. Techniques like type erasure and code deduplication yielded minimal improvements. The breakthrough came from splitting the generated Rust code into 1,106 smaller crates, enabling parallel compilation and dramatically reducing compile time to under 2 minutes, fully utilizing multi-core processors.
Read more