C99 (玩具)编译器工具链在 Rust 中 (在一个周末里,为娱乐和自我教育)
A simple C compiler written in the Rust-lang. (early development stage, started at Mar 30, 2019)
(PS. this is the development branch, if you want to see how to write a simple c compiler in rust, you should check branch toy, which contains a simple c compiler written in rust without extra libs, it can read simple c source code and produce x86-64 assembly code).
Should follow the C11 Standard and generate binary code from C source code.
This compiler is in the very early development stage, the plan is to continue developing it until it can compile real-world applications.
If you are interested in crust and want to contribute, feel free to join the Gitter chat room,
we have already got some contributors now who are interested in building this project.
#include "local-header", nested-include is supported (need to add more features)/**/ and //\#[allow(dead_code)]You need a valid rust environment, Cargo.
(PS. Now the crust can only preprocess, lex, and parse the source code, the generator was disabled now).
$ cargo build # use this command to build the projectrun
$ cargo run [FLAGS] ...Run:
$ ./test_dev.sh(PS. This is pretty time consuming, cause benchmark will do lots of iterations to test different layers' performance.
Might take 20 to 30 minutes until it is finished. ) Run:
$ cargo benchAfter it is finished,
you can open target/criterion/report/index.html in your web browser to see the details of performance.
暂无开放 Issues,或尚未同步最近议题。