BCC is a C compiler for the BatPU architecture. It is based off of "Writing a C Compiler" by Nora Sandler, and is written in Rust.
To build BCC, you will need to have Rust installed. You can install Rust by following the instructions at rustup.rs.
Once you have Rust installed, you can build BCC by running the following command:
cargo build --release
This will build the BCC compiler in release mode. The compiled binary will be located at target/release/bcc
.
You may also choose not to build. Compiling will be slightly slower, but not that much.
To compile a C file when you've built, run the following command:
<compiler executible> <input_file> -o <output_file>
Compiler executible could be target/release/bcc
if you built it yourself, or c-compiler
if you're using the prebuilt binary.
To compile a C file without building, run the following command:
cargo run <input_file> -o <output_file>
These will compile the input file and output the resulting assembly to the output file.
If you choose not to specify an output file, the assembly will be placed in output.as
.
BCC is licensed under the MIT License. See LICENSE for more information.
If you would like to contribute to BCC, please read CONTRIBUTING.md for more information.
If you would like to request a feature, please open an issue with the feature-request
label.
- BatPU Emulator by AdoHTQ
- Writing a C Compiler by Nora Sandler
- Rust
- Me