Skip to content

He1pa/Tiny-compiler-in-500-lines-of-Rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny compiler in 500 lines of Rust

Write a tiny compiler in 500 lines of rust to run hello world in cargo init template.

fn main() {
    println!("Hello, world!");
}

It's very simple but still includes a hand-coded lexer, parser (LL1) and LLVM IR codegen. I didn't implement the resolver part because the example code is simple enough that I assume it will always be right.

requirement

  • Clang
  • LLVM 12

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published