CJIT: C, Just in Time
smartmic
104 points
29 comments
April 28, 2026
Related Discussions
Found 5 related stories in 78.5ms across 8,303 title embeddings via pgvector HNSW
- jj – the CLI for Jujutsu tigerlily · 514 pts · April 14, 2026 · 55% similar
- The Journal of C Language Translation kristianp · 12 pts · April 14, 2026 · 54% similar
- Retrofitting JIT Compilers into C Interpreters ltratt · 65 pts · April 15, 2026 · 53% similar
- Mise-En-Place dotmanish · 13 pts · April 25, 2026 · 50% similar
- Don't Wait for Claude jeapostrophe · 27 pts · March 27, 2026 · 49% similar
Discussion Highlights (15 comments)
uticus
https://dyne.org/cjit/graphics.html#cjit-for-graphical-appli... > Be welcome to the exciting world of graphical C applications using SDL (Simple DirectMedia Layer). SDL, originally developed by Sam Lantinga in 1998... That's batteries included.
michaelcampbell
Looks interesting and fun, but in no instance of any C compiler I've come across is the "classic example" of "hello, world" using `fprintf(stderr, ...)` To each their own I guess.
dang
Related: Show HN: CJIT, a single-binary C compiler that can self host - https://news.ycombinator.com/item?id=47751458 - April 2026 (1 comment) C, Just in Time - https://news.ycombinator.com/item?id=42246209 - Nov 2024 (7 comments) (Pity the Show HN didn't get attention - we'll email the author)
gosukiwi
Did you use Codex 5.4 for the web design? :p I think Codex tends to do very similar designs, could be completely mistaken tho
grebc
Sweet project! I will give this a go today :)
omoikane
> inspired by HolyC by Terry Davis Definitely was not expecting this reference. https://en.wikipedia.org/wiki/TempleOS#HolyC https://en.wikipedia.org/wiki/Terry_A._Davis
theogravity
The site visually feels "compressed" due to the font used? It's a bit jarring. The tutorial link in the header nav doesn't go anywhere.
apitman
Cool idea. I was wondering why the release explicitly is `cjit-x86_64-ubuntu-24.04` instead of generic linux, but it does in fact appear to not work on Arch: `tcc: error: file '/lib/x86_64-linux-gnu/libgcc_s.so.1' not found` I'm guessing that's due to a `dlopen` since it's not listed by `ldd` The TUI demos work great, but I couldn't get the SDL examples to resolve all the missing symbols after trying for a bit.
taylorallred
Pair this with Fil-C( https://fil-c.org/ ) and now you have C but as a truly bonafide scripting language.
jsLavaGoat
Inspired by Terry. But does it glow?
nutjob2
Much more interesting is Mir: https://github.com/vnmakarov/mir It has all the tools for custom JIT including a nice C compiler.
slopinthebag
> CJIT is not a tracing or adaptive JIT in the VM sense. It does not interpret first and optimize hot paths later. > CJIT uses TinyCC to compile C quickly, often in memory, and can execute the resulting code immediately. Wait, what's the difference between this and just using tinycc directly? cat program.c | tcc -run - Happy to be proven wrong here, since the project has been around for a couple years. It doesn't appear to just be a random AI one-shot thing.
wavemode
> inspired by HolyC by Terry Davis ...in what way? o.O
tnelsond4
> What's different between tcc -run and CJIT? >The main difference is in usability. > CJIT improves three main UX aspects for now: > It works as a single executable file which embeds the TinyCC compiler, all its headers and its standard library. This way there is no need to install anything system wide, check paths and setup build folders. > It supports adding multiple files into one execution: can accept wildcards to ingest anything that is a C source, a pre-compiled object or a shared library. The symbols exported by each file will be visible to all during the same execution. > It finds automatically common system libraries for each target platform, avoiding the need to repeat these settings and look for the right paths.
notorandit
I wonder whether CJiT can compile itself a-la GCC and LLVM. FAQs don't mention this and maybe the next weekend I will try to boot cjit with cjit itself.