Tiny C Compiler is a C compiler that generates machine code for multiple architectures and can execute C code directly without separate linking or assembly steps.
The tool solves the problem of needing a lightweight, fast compiler for environments where traditional compilers are impractical, such as rescue disks or embedded systems. It achieves this by prioritizing minimal size and compilation speed, generating code roughly ten times faster than GCC at optimization level zero. The compiler supports direct execution of C source files, includes a full C preprocessor, and can be invoked as a script interpreter by adding a shebang line to C source files, allowing them to run like shell scripts. It targets i386, x86_64, ARM, AArch64, and RISC-V architectures and aims toward full ISO C99 compliance.
Developers should choose this tool when size and compilation speed matter more than optimization or comprehensive standard library support. It suits embedded systems, rescue environments, and scenarios where C scripting capability is valuable. The project includes an optional memory and bounds checker that can be mixed with standard code. A minimal libc header file is provided for environments like floppy disks, though standard headers can also be used. The compiler can compile itself, demonstrating its capability to handle non-trivial C code.
Development activity shows consistent engagement with the codebase through regular commits addressing compiler correctness and feature completeness. The project maintains an active test suite that exercises subtle edge cases in code generation. Work spans multiple target architectures and includes ongoing refinement of C standard compliance. The repository serves as an unofficial mirror of the main development branch, indicating the project continues to evolve beyond its initial release.