/kira-rs

The example SysY compiler Kira for PKU compiler course, written in Rust.

Primary LanguageRustGNU General Public License v3.0GPL-3.0

Kira (Rust version)

Kira is an example compiler for PKU compiler course, it can compile SysY language into Koopa IR and RISC-V assembly.

kira-rs is written in Rust, for C++ example, please see kira-cpp.

Usage

# compiler `input.c` to Koopa IR
cargo run -- -koopa input.c -o output.koopa
# compiler `input.c` to RISC-V assembly
cargo run -- -riscv input.c -o output.S

Changelog

See CHANGELOG.md.

Copyright and License

Copyright (C) 2010-2022 MaxXing. License GPLv3.