Recently, we discovered how Rust Rust design does not encourage quick compilation. In the previous article, we discussed the trade-off of difficult compilation time required to implement generic medicine.

This time we will talk about the translation unit.

Compilation unit

Compiler unit is the basic unit of work that the language compiler operates. In C and C ++, the compilation unit is a source file. In Java it is a source file. In Rust, the compilation unit is a bucket, composed of many files.

The size of the compilation units is subject to some tradeoffs. Larger translation units take more time to analyze, translate and optimize than smaller compilation units. And generally, when a change is made to a compilation unit, the entire compilation unit must be recompiled.

#storage-system #database #programming #rust

Rust’s Huge Compilation Units
1.30 GEEK