##navigation.skip.nav## ##navigation.skip.main## ##navigation.skip.footer##

Elektrotehničko i računarsko inženjerstvo

God. 40 Br. 12 (2025): Zbornik radova Fakulteta tehničkih nauka

MEĐUREPREZENTACIJE IZVORNOG KODA RUSTC KOMPAJLERA

  • Aleksa Bajat
DOI:
https://doi.org/10.24867/33BE08Bajat
Predato
December 9, 2025
Objavljeno
2026-02-18

Apstrakt

Ovaj rad istražuje arhitekturu prednjeg kraja (engl. frontend) Rust kompajlera (rustc), sa fokusom na ključnu ulogu koju međureprezentacije izvornog koda igraju u procesu prevođenja. Analizirane su faze od leksičke analize i parsiranja do generisanja Apstraktnog Sintaksnog Stabla (ASS), preko Međureprezentacije Visokog Nivoa (MVN/HIR), Tipizirane MVN (TMVN/THIR), do Međureprezentacije Srednjeg Nivoa (MSN/MIR). Rad objašnjava kako svaka od ovih reprezentacija omogućava ključne funkcionalnosti Rust jezika, uključujući proveru tipova, dijagnostiku grešaka, inkrementalno kompajliranje, proveru pozajmljivanja (borrow checking) i pripremu za dalju optimizaciju i generaciju koda u LLVM-u. Cilj je da se prikaže kako generisanje infrastrukture doprinosi garancijama memorijske bezbednosti i visokim performansama Rust programskog jezika.

Reference

  1. [1] MSRC, “A proactive approach to more secure code | MSRC Blog | Microsoft Security Re-
  2. sponse Center,” Microsoft.com, Jul. 16, 2019. https://msrc.microsoft.com/blog/2019/07/
  3. a-proactive-approach-to-more-secure-code/ (pristupljeno u septembru 2024.)
  4. [2] “Parsing” Rochester.edu, 2024. https://www.cs.rochester.edu/u/nelson/courses/csc_
  5. 173/grammars/parsing.html#:~:text=Recursive%2Ddescent%20parsing%20is%20one,
  6. non%2Dterminal%20with%20a%20procedure (pristupljeno u septembru 2024.)
  7. [3] A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman, Compilers: Principles, Techniques, and Tools, 2nd ed. Boston, MA, USA: Addison-Wesley, 2006.
  8. [4] “Getting Started - Rust Compiler Development Guide,” Rust-lang.org, 2024. https:
  9. //rustc-dev-guide.rust-lang.org/getting-started.html (pristupljeno u Septembru 2024.)
  10. [5] “Introduction - The Rust Reference,” Rust-lang.org, 2015. https://doc.rust-lang.org/
  11. reference/introduction.html (pristupljeno u septembru 2024.)
  12. [6] “Meet Safe and Unsafe - The Rustonomicon,” Rust-lang.org, 2024. https://doc.rust-lang.
  13. org/nomicon/meet-safe-and-unsafe.html (pristupljeno u septembru 2024)
  14. [7] “What are editions? - The Rust Edition Guide,” Rust-lang.org, 2024. https://doc.rust-lang.
  15. org/edition-guide/editions/ (pristupljeno u oktobru 2024.)
  16. [8] “The Unstable Book - The Rust Unstable Book,” Rust-lang.org, 2024. https://doc.rust-lang.
  17. org/unstable-book/index.html (pristupljeno u oktobru 2024.)
  18. [9] Li, Chenghao, et al. “Demystifying Compiler Unstable Feature Usage and Impacts in the Rust Ecosys-
  19. tem.” 26 Oct. 2023. arXiv, (pristupljeno u oktobru 2024.)
  20. [10] Bugden W, Alahmar A. Rust: The programming language for safety and performance. arXiv preprint arXiv:2206.05503. 2022 Jun 11.
  21. [11] P. Mainardi, “The Rising Threat of Software Supply Chain Attacks: Managing Dependencies of Open Source projects,” Linuxfoundation.eu, Aug. 15, 2023. https://linuxfoundation.eu/newsroom/
  22. the-rising-threat-of-software-supply-chain-attacks-managing-dependencies-of-open-source-p
  23. (pristupljeno u oktobru 2024.)
  24. [12] “The Architecture of Open Source Applications (Volume 1)LLVM,” Aosabook.org, 2024. https:
  25. //aosabook.org/en/v1/llvm.html (pristupljeno u novembru 2024.)
  26. [13] “The LLVM Compiler Infrastructure Project,” Llvm.org, 2024. https://llvm.org/ (pristupljeno u novembru 2024.)