Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 1.08 KB

README.md

File metadata and controls

23 lines (19 loc) · 1.08 KB

A work-in-progress to re-implement my B-Minor Compiler in Rust.

Currently, lexing, parsing, name resolution, typechecking, and some other analysis/verification are all "done". All that's left (besides a lot of polish) is to tie it in to a backend powered by LLVM via the Inkwell crate. Until I've done that, you can see a much smaller practice project I did to learn about LLVM here.

If you're unfamiliar with Rust and want to build/run the project (after installing Rust and Cargo via Rustup):

cargo run -- examples/hello_world.bm

(Currently, running it with the hello_world example also won't output much as there's no code generation, so you can either input a print statement with the AST after parsing, or run one of the examples in the should_error folder to see diagnostic output!)

Important

Building the compiler from source requires an installation of LLVM v18, as LLVM's API headers are called externally.

If you want to build the documentation:

cargo doc --document-private-items