Introduction to TinyCC
TinyCC (also known as TCC) is a small but hyper-fast C compiler. Unlike other C compilers, it is self-relying—you don’t need an external assembler or linker because TCC does that for you.Installation
Get TinyCC running on Linux, BSD, macOS, or Windows
Quick start
Compile and run your first C program in seconds
Command line
Learn TCC command line options and usage
C scripting
Run C code like shell scripts with shebang support
Why TinyCC?
Small
You can compile and execute C code everywhere, even on rescue disks. TCC’s tiny footprint makes it ideal for embedded systems, minimal environments, and situations where disk space is limited.Fast
TCC generates machine code for i386, x86_64, ARM, AArch64, and RISC-V. It compiles and links about 10 times faster thangcc -O0. For many projects, compilation is so fast that you don’t even need Makefiles.
Unlimited
Any C dynamic library can be used directly. TCC supports ANSI C, most of ISO C99, and many GNU C extensions including inline assembly. TCC can even compile itself.Safe
TCC includes an optional memory and bounds checker. Bounds-checked code can be mixed freely with standard code, and checks work even with unpatched libraries.Key features
Direct execution
Compile and execute C source directly without linking or assembly steps
C scripting
Add
#!/usr/local/bin/tcc -run to your C source and execute it like a shell scriptFull preprocessor
Complete C preprocessor included with macro support
Dynamic code generation
Use
libtcc as a backend for runtime code generationMulti-architecture
Supports i386, x86_64, ARM, AArch64, and RISC-V architectures
Bounds checking
Automatic memory and bounds checking for safer code
Use cases
Rapid prototyping
Get instant feedback on your C code without waiting for slow compilation cycles. Perfect for learning C or testing algorithms.
C scripting
Write system utilities and automation scripts in C instead of shell or Python. Get the performance of C with the convenience of scripting.
Embedded development
Deploy a complete C compiler on resource-constrained systems where larger toolchains won’t fit.
TCC aims for full ISO C99 compliance and includes many GNU C extensions. It can compile standard C code that works with GCC or Clang.
Platform support
TinyCC runs on:- Linux (all major distributions)
- BSD variants (FreeBSD, OpenBSD, NetBSD)
- macOS (Intel and Apple Silicon)
- Windows (native Win32 support)
- i386 (32-bit x86)
- x86_64 (64-bit x86)
- ARM (32-bit)
- AArch64 (64-bit ARM)
- RISC-V (64-bit)
Next steps
Install TinyCC
Follow the installation guide for your platform
Try the quick start
Compile and run your first program in under a minute