GitHub|Download|Report a bug Mucc Home|Documentation

The Mucc C Compiler

Mucc is a small, fast, self-hosting C compiler toolchain for x86-64 and ARM64 Linux. The compiler, preprocessor, assembler, linker, archiver, headers and C library are one static file of a few megabytes. Copy it onto any 64-bit Linux machine, an empty container or a USB stick, and it builds working C programs with nothing else installed: no gcc, no binutils, no system headers.

curl -Lo mucc https://github.com/Dom-Yan/Mucc/releases/latest/download/mucc-$(uname -m)-linux
chmod +x mucc
./mucc -o hello hello.c && ./hello

Getting Started

Install mucc, build your first program, make it your default compiler, or build it from source.

User Guide

Compiling and linking, the two C libraries, cross-compiling, libraries, assembly and debugging.

Command-Line Reference

Every option mucc acts on, and the gcc flags it accepts.

C Language Support

C17 and C23, the GNU extensions, builtins, and what mucc does not do.

Performance

How fast mucc compiles next to gcc, clang and tcc, and how fast its code runs.

How Mucc Works

The pipeline, the single binary and its packed files, and how mucc builds itself.

News

What Makes Mucc Different

At a Glance

Compile speedSeveral times faster than gcc -O0, and faster than clang -O0 (the numbers)
Generated codeIn the range of gcc -O0's; slower than gcc -O2's
SizeOne static binary of a few megabytes, with musl and Linux's headers inside (what's in it)
LanguageC17 by default, C23 with -std=c23, plus the GNU extensions real code uses
Targetsx86-64 and ARM64 (AArch64) Linux, natively or cross-compiling either way
Self-hostingEach release is built by the one before it, with no gcc or binutils, and rebuilds itself byte for byte
LicenseThe Mucc License: free for any use; programs you build with mucc are yours alone (details)

What It Doesn't Do

Use gcc or clang if you need any of these:

C Language Support has the full list.