Skip to content
Opensource internals
  • Posts

Codegen

Merging Codegen Units by Overlap: How rustc Decides What Goes in the Same .o File

Oct 21, 2026 5 min read Jay Hubbert

rustc’s CGU partitioning places items by their characteristic DefId and then merges units by inlined-item overlap, which keeps duplicated inlined code to a minimum.

RustInternalsCompilerCodegenPerformance

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·