Cj–tiny no-deps JIT in C for x86-64 and ARM64
Details
- External ID
- 45825006
- Source
- HN
- Company
- —
- Product
- Cj–tiny no-deps JIT in C for x86-64 and ARM64
- Website domain
- github.com
- Launched
- Nov. 5, 2025
- Cohort
- —
- Upvotes
- 21
- Upvotes percentile
- 0.7030567685589519
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:25 p.m.
- Updated at
- Sept. 7, 2026, 9:25 p.m.
Description
Hey y’all!About 7 years ago, I had this idea to write a JIT with an autogenerated backend for x86 based on the ISA specs. I sketched something out and then just kinda let it sit. I picked it up again a few weeks ago and made a complete-ish backend for both x86 and ARM64. It has no dependencies, the backends are completely autogenerated (by horrible, horrible JS scripts), and I built a small abstraciton layer for things like functions prologues etc.It’s super duper early and will probably break on your machine, but it’s good enough to compile some cool examples (look at the examples directory: https://github.com/hellerve-pl-experiments/cj/tree/master/ex..., my personal favorite is the minimal language implementation: https://github.com/hellerve-pl-experiments/cj/blob/master/ex...).It doesn’t have anything except basically a fancy JIT assembler with some helpers as of yet. No register allocator, a lot of ABI details will still have to be figured out manually (though of course feel free to add anything to the abstraction layer that’s generally useful and submit a PR!).I honestly don’t know where I’m going with this next. I kind of stumbled into the project, and am not sure whether I’ll consider it as “exercise completed” or whether I should pursue it more. Time will tell.Feedback, questions, and bug reports very welcome—especially on the codegen helpers, additional examples or cool things you come up with, or backend rough edges.P.S.: I also wrote a small announcement blog post on it that you can find here (https://blog.veitheller.de/cj:_Making_a_minimal,_complete_JI...), but it honestly doesn’t add all that much interesting info that you can’t find in the repo.
Enrichment
- Theme
- lightweight and on-device AI runtimes
- Vertical
- Horizontal
- Function
- Dev tools
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Hobby / open-source project
- Normalized one-liner
- jit compiler in c for x86-64 and arm64
- Manually corrected
- False
Could you build this?
No Building a zero-dependency JIT compiler that parses machine ISA specs and generates correct machine code for both x86-64 and ARM64 requires deep low-level systems programming and assembly expertise.
What it would actually take: A developer must write a C backend that manages executable memory pages (mprotect/VirtualAlloc), implements ABI calling conventions (System V and Microsoft x64, AAPCS64), and handles instruction encoding nuances for variable-length x86 and fixed-length ARM instructions. The system requires an automated instruction parser that translates official machine-readable ISA specs into C encoding tables, along with register allocation and stack frame management algorithms. This demands specialized domain knowledge in compiler architecture, machine instructions, and OS memory internals that AI coding assistants cannot autonomously architect.
Discussion
1 comment analyzed.
Feature requests: Self-compilation capability
Competitors
Other products that read as similar to this one — 174 launches clear the similarity bar, closest 8 shown.
Attention rank: #74 of 175 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 5 days after the earliest competitor.
- CJIT, a single-binary C compiler that can self host · hn · 2026-04-13 · 7 upvotes · similarity 0.59
- Xcc700: Self-hosting mini C compiler for ESP32 (Xtensa) in 700 lines · hn · 2025-12-26 · 154 upvotes · similarity 0.51
- Mach · hn · 2026-06-08 · 32 upvotes · similarity 0.48
- Built a tiny interpreter from scratch in C to understand how they work · hn · 2025-11-12 · 5 upvotes · similarity 0.45
- A C/C++ IDE written in C from scratch with zero dependencies · hn · 2026-03-22 · 10 upvotes · similarity 0.44
- I wrote a custom assembler for CHIP-8 in C++ · hn · 2026-09-17 · 28 upvotes · similarity 0.43
- Pbnj · hn · 2025-12-05 · 69 upvotes · similarity 0.43
- Web-REPL "skred" : my OSS sound engine w/retro C64 appearance · hn · 2026-05-10 · 5 upvotes · similarity 0.43
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a dev tools tool for Sales yet.