Back to browse
CJIT, a single-binary C compiler that can self host

CJIT, a single-binary C compiler that can self host

by jaromilrojo·Apr 13, 2026·7 points·1 comment

AI Analysis

●●SolidWizardryCozy

Single-file C compiler under 2MB that self-hosts without toolchain setup.

Strengths
  • Under 2MB single executable with no EULA or IDE required
  • Calls dynamic libs using shared functions from any system library
  • Cross-platform support for Windows, macOS, and Linux
Weaknesses
  • TinyCC already exists with similar single-binary capabilities
  • Niche audience for standalone C compiler without full toolchain
Target Audience

C developers, educators, rapid prototypers

Similar To

TinyCC · tcc · HolyC

Post Description

CJIT started as a hobby project around Fabrice Bellard’s tinyCC and slowly grew into something much more practical. It is now a small portable C compiler and runner that works across Linux, macOS, and Windows, can self host, and is packaged as a single executable.

What mattered most to me was keeping the barrier to entry low. You can take one small binary, drop it onto a system, and compile or run C code using the libraries already available there, without setting up a full toolchain or installing a large stack of dependencies.

I find that useful for quick prototyping, testing, auditing, learning, and generally exploring real systems with less friction. The codebase also reached a point where it feels solid and maintainable, not just experimental.

It is still a small project, and I want to keep it that way: simple, useful, and easy to carry around.

A fun extra: it works nicely with raylib as well.

Interested in feedback from people here, especially on the single-binary approach and whether this kind of tool feels useful in practice.

Similar Projects