This is a compiler for the Teeny Tiny language, implemented in Rust. It compiles .teeny
files into C, and then uses GCC to compile the C code into executables.
compiler.webm
- Rust and Cargo (Install Rust)
- GCC (GNU Compiler Collection)
-
Clone this repository:
git clone https://github.com/yourusername/rust-compiler.git
-
Navigate to the project directory:
cd rust-compiler
-
Build the project:
cargo build --release
-
Make sure the
compile.sh
script is executable:chmod +x compile.sh
-
Write your code and save the file with a
.teeny
extension. -
Compile your
.teeny
file:bash compile.sh your_file.teeny
This will create an executable with the same name as your
.teeny
file. -
Run the compiled program:
./your_file
If you have a file named lol.teeny
:
-
Compile it:
bash compile.sh lol.teeny
-
Run it:
./lol .
Contributions are welcome! Please feel free to submit a Pull Request.
This project was inspired by Austin Henley's tutorial on building a Teeny Tiny compiler.