CJIT: C, Just in Time

(dyne.org)

55 points | by smartmic 2 hours ago

11 comments

  • taylorallred 24 minutes ago
    Pair this with Fil-C(https://fil-c.org/) and now you have C but as a truly bonafide scripting language.
  • dang 1 hour ago
    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)

  • apitman 28 minutes ago
    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.

  • michaelcampbell 2 hours ago
    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.

    • apitman 31 minutes ago
      Give io buffering an inch and it will take a mile
  • theogravity 29 minutes ago
    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.
  • jsLavaGoat 13 minutes ago
    Inspired by Terry. But does it glow?
  • gosukiwi 58 minutes ago
    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
    • ethmarks 26 minutes ago
      The source for the site is here: https://github.com/dyne/cjit/tree/main/docs. It's a VitePress site with a custom theme. Glancing through the code, I don't see any obvious signs of LLM coding. It also definitely wasn't created with Codex specifically, because according to the commit history, the first version of the site was in late 2024, months before Codex even released.
    • zamadatix 44 minutes ago
      Looks like a generic static site generator page to me. I'd be surprised if dyne folks used a closed system like Codex specifically.
  • grebc 47 minutes ago
    Sweet project! I will give this a go today :)
  • omoikane 39 minutes ago
    > 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

    • BirAdam 12 minutes ago
      I’m not surprised by it, but I am confused as I do not see anything that reminds me of TempleOS, HolyC, or Davis. If anything, this is just pushing the tcc —run functionality one step further.
  • uticus 2 hours ago
    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.

    • apitman 15 minutes ago
      It links to the system SDL, on Linux at least.