"Hey you, you're finally awake. You were trying to cross the border into Compiler Development, right?"
Hi, I'm František Lednický and this is IIRA. A programming language built by students, for students.
Note
Right now, this is a "solo" project. It's just me working on it.
The goal is to create something that other students can dive into to see how compilers work. Most modern compilers are massive behemoths that take 40 minutes just to compile. IIRA, on the other hand, doesn't aim to be like C++, Rust, Zig, or Carbon. It's meant to be used for learning how compilers for such languages work by building their younger, more approachable sibling.
Warning
While I am excited to share my progress, please note that IIRA is in its very early stages. I welcome early feedback and discussions, but I recommend against using IIRA for anything beyond simple experimentation. If you find a bug or have a suggestion, feel free to open an issue.
"A human's concept of love requires admiration, attraction, devotion, and respect. Conclusion; I am 50% in Love."
TODO: Simple Design Document for IIRA's philosophy and syntax.
For now, you can read about IIRA's design in this example file.
Standard compiler architecture looks something like this:
------------ ----------- ------------- ----------
source --> | frontend | --> | backend | --> | assembler | --> | linker | --> a.out
------------ ----------- ------------- ----------
--^--- ---^---- --^---
qbe il assembly object
The frontend is responsible for parsing the language and constructing a machine-independent Intermediate Representation (IR) represented in Intermediate Language (IL). The backend then optimizes this IR and turns it into compilable, machine-specific assembly.
Note
IIRA uses QBE as its backend, which means that we can focus purely on building the frontend.
IIRA's frontend architecture looks like this:
--------- ----------- ---------------------- ----------------- --------------
source.iira --> | lexer | --> | pareser | --> | semantics analyzer | --> | graph builder | --> | il emitter | --> source.qbe
--------- ----------- ---------------------- ----------------- --------------
--^--- -----^----- -----^----- --^--
tokens syntax tree syntax tree graph
TODO: More detailed description.
There are three projects in this repository (for now):
- unfinity (lib): Minimal utility library
- iira (lib): Shared components for IIRA's compiler, language server, and formatter
- iirac: The IIRA compiler frontend
Note
There are no external dependencies aside from ASan, UBSan, and the C standard library (libc).
unfinity includes:
- uf_common - Common functionality used across other modules
- uf_memory - Wrappers for standard memory allocation/deallocation functions
- uf_logger - Simple logging module designed for printing to the terminal
- uf_containers - Container structures for efficient data handling
iira includes:
- ii_lexer - IIRA's lexical analyzer
- TODO
iirac includes:
- iic_arguments - Argument parsing
- TODO
Important
IIRA uses Xmake as the main build system. You have to install it first via your package manager.
Anyone, regardless of experience, can join. Whether you want to fix a typo in the docs, optimize a semantic analyzer pass, or design a new module, you are welcome here.
But before you open a Pull Request:
- Check the issues. I don't want to end up with two people trying to kill the same boss.
- If your code looks like a Skyrim mod list with 500 conflicts, it’s not getting merged.
- Unlike Valve, I actually plan to reach v3.0 someday. Maintainable code is crucial for that to happen.
- I’m a student too, so I might not review a PR instantly. Be patient; I’m probably studying (or playing Diablo).
I believe in giving credit where it's due. Under the Mozilla Public License 2.0 licensing model, your contributions belong to the community, but the ownership of your work stays with you. Every time you contribute a new file or lead a major change, your name goes at the top of that file. You aren't just an anonymous "contributor #69"; you are an author.
IIRA is licensed under the MPL 2.0. This is a weak-copyleft license that protects the compiler source code while allowing you to use the language to build any application (proprietary or open source) without restrictions. See the LICENSE file for more information.