2 ms·
Yes. Rust's compiler, rustc, is a bunch of Rust code that parses Rust syntax into an Abstract Syntax Tree to which it can apply macros, then this is lowered thr
by tialaramex 3y ago
Yes. Rust's compiler, rustc, is a bunch of Rust code that parses Rust syntax into an Abstract Syntax Tree to which it can apply macros, then this is lowered through two levels of intermediate representations, where more Rust code does the type inference and type checking and eventually borrow checking and various optimisations, until eventually it's lowered to LLVM Intermediate Representation LLVM IR, which LLVM will further optimise then produce machine code for the target architecture.
- reocha 3y agoImpressive knowledge o7
- Dudester230602 3y agoWhat do Rust developers tend to do while the code is compiling? Vote 'Rust' in all the programming language surveys?
- xedrac 3y agoI know you're getting downvoted, but seriously, Rust compilation/linking does take a long time, especially if you enable fat LTO. The upside is it's doing a lot more for you than say the C or C++ compiler would. It's a very small price to pay for what you get.
- proc0 3y agoThey play Rust.
- Measter 3y agoOf course not, don't be daft! We go shopping for CPUs.