Rustコンパイラの処理の流れ(1)

  1. .rsファイルをパースし、ASTを生成
  2. マクロの展開、名前解決、#[cfg] アトリビュートの解釈
  3. ASTをHIRに変換
  4. 型推論、型解析
  5. HIRをMIRに変換
  6. MIRをLLVM IRに変換、最適化
  7. .o ファイルをリンク

.rsファイルのパース

参考

--

--

--

Software engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Takanori Ishibashi

Takanori Ishibashi

Software engineer

More from Medium

Exploiting the Rust’s type system to avoid runtime errors.

Leaf Traversal | Rust

Rust 002 — Variables, Functions, Conditionals, Loops

How to use “Type safe routing” of axum