CJIT, a single-binary C compiler that can self host
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
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.
HN · launched Apr 13, 2026 · 7 upvotes (top 61%) · 0 views
Niche: programming language compilers · 77 launches, 2 in the last 7 days ▼ -60% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 77 launches in programming language compilers →
Could you build this?
No Building a self-hosting C compiler and JIT engine packaged into a single cross-platform binary requires profound knowledge of compiler design, assembly, ABI standards, and platform-specific linkers.
What it would actually take: The architecture involves modifying or wrapping Fabrice Bellard's TinyCC with custom in-memory ELF/PE/Mach-O loaders and platform-specific syscall layers. The hard parts include writing low-level code generation for x86_64 and ARM64, implementing symbol resolution across dynamic libraries, and ensuring strict self-hosting bootstrapping. This demands specialized systems programming expertise in C, compiler internals, and architecture-specific ABIs.
Discussion
1 comment analyzed.
Competitors mentioned: TCC
Concerns raised: Unclear how it handles standard C libraries compared to TCC
Competitors
Other products that read as similar to this one : 675 launches clear the similarity bar, closest 8 shown.
Attention rank: #431 of 676 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 165 days after the earliest competitor.
- Xcc700: Self-hosting mini C compiler for ESP32 (Xtensa) in 700 lines · hn · 2025-12-26 · 154 upvotes · similarity 0.64
- Cj–tiny no-deps JIT in C for x86-64 and ARM64 · hn · 2025-11-05 · 21 upvotes · similarity 0.61
- Mach · hn · 2026-06-08 · 32 upvotes · similarity 0.55
- Built a tiny interpreter from scratch in C to understand how they work · hn · 2025-11-12 · 5 upvotes · similarity 0.53
- A C++ Compiler That Is Faster Than GCC and Clang · hn · 2026-11-05 · 8 upvotes · similarity 0.52
- Turbo Lisp · hn · 2026-10-15 · 5 upvotes · similarity 0.52
- btrc · hn · 2026-03-02 · 5 upvotes · similarity 0.51
- I built a Cargo-like build tool for C/C++ · hn · 2026-04-09 · 177 upvotes · similarity 0.51
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.