Kompilatora priekšgala izstrāde Rust programmēšanas valodā
Автор
Vorza, Rainers
Co-author
Latvijas Universitāte. Datorikas fakultāte
Advisor
Bojārs, Uldis
Дата
2024Metadata
Показать полную информациюАннотации
Šī bakalaura darba ietvarā tiek veikta detalizēta kompilatoru darbības un izstrādes procesa analīze, izmantojot Rust programmēšanas valodu. Tajā apskatītas kompilatora galvenās daļas: priekšgals, starpsistēma un aizmugursistēma. Darbā izskaidrota priekšgalu ģeneratoru un gatavu aizmugursistēmu izmantošana, īpaši pievēršot uzmanību LLVM aizmugursistēmas izmantošanai. Darbs praktiskā daļa ietver jaunas minimālas programmēšanas valodas un kompilatora, kas izmanto LLVM aizmugursistēmu, izstrādi. Dokumenta pēdējā nodaļā aprakstīti šī kompilatora darbības principi, izstrādes laikā pieņemtās izvēles, pašreizējie ierobežojumi un nākotnē veicamie uzlabojumi. Papildus, dokumentā tiek izskaidrotas vairākas Rust programmēšanas valodas unikālās īpašības, piemēram, tās datu tipu un piederības modeļi, un kā tie ir ietekmējuši projekta izstrādi. This thesis provides a detailed exploration of compiler development using the Rust programming language. It delves into the modular nature of the frontend, middle-end, and backend systems involved in the compilation process. The text explains the use of frontend generators and ready-made backends, with LLVM being highlighted as a popular choice of backend system. The thesis includes the development of a new minimal programming language and compiler, which uses the LLVM backend. The final section of this document describes the inner workings, choices made, limitations, and future improvements for this compiler. Additionally, the document explains many of the Rust programming language’s unique features, like it’s strong type and data ownership models, and how they’ve affected the development of the project.