Our great sponsors
-
MIR goes through many different transformations from the time it's built to what gets lowered to LLVM IR. It's also worth noting that borrow checking works on MIR. Some of the most important MIR transformations are drop elaboration and generator lowering.
-
This is probably the most obvious step of how rustc transforms source code. The first step in this is lexing - it converts your rust code into a stream of tokens. The stream is similar to that of TokenStream in procedural macros, but the API is different - proc_macro requires stability, while rustc is very unstable. For example: rs fn main () {} transforms into Ident, Ident, OpenParen, CloseParen, OpenBrace, CloseBrace, At this point, it's important to note that identifiers are just represented as Ident. This is also represented through an enum internally via rustc_lexer. Then, the second stage, parsing. This transforms the tokens into a more useful form, the abstract syntax tree, Using the AST Explorer, putting in our code and selecting Rust language, we can see that the code above transforms into an AST. I won't paste the AST here due to sheerly how long it is, but I invite you to check it out yourself.
-
InfluxDB
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
-
It's possible - you could open an issue on the rustc-dev-guide repo if you'd like. https://github.com/rust-lang/rustc-dev-guide/
-
inkwell is a great llvm binding for rust and it has an implementation of kaleidoscope