Compilation stages in rust

Hi Team,
I an very much interested to know the compilation stages in case of rust. Means when i run rustc <> at that time what are the stages involved. How can i see all the stages and files. Like in C language i can see pre-processer file, object file. So similarly how can i see in rust as well. Would be very much helpful if any document or link present with explanation.
Thank you

I think people over at would be better equipped to answer this question, as it pertains to how the compiler operates.

1 Like

The rustc guide might be useful, especially overview of the compiler.


For intermediate files, you could use rustc -Csave-temps, as well as various --emit options (see --help).


Thank you this document is good. I will go to this document.

The rust compiler does not have stages in the traditional sense. I recommend reading through Queries: demand-driven compilation - Guide to Rustc Development.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.