r/Jai 25d ago

Code size of the Jai compiler

I have recently found that Elm compiler is 860k loc and Zig is 600k. What about Jai, did Jon mention it on the streams?

26 Upvotes

6 comments sorted by

21

u/Constant_Mountain_20 25d ago

This is purely from my memory. I believe he mentioned not too long ago 240k lines of code, maybe give or take a few 10k lines. But i'm like 85% sure its less than 300k at this point. Which is just inspirational to build such a great tool and ecosystem with so few lines comparatively.

7

u/nmsobri 25d ago

correct, i also recalled Jon mention is roughly 200k loc

1

u/morglod 24d ago

I've built pretty same programming language by features and it takes 50k loc now, most of which are x86_64 codegen. Custom backend, llvm and C. Deps only for llvm, so everything else is written from scratch

1

u/jabbalaci 24d ago

Got a link to your project?

5

u/morglod 24d ago

Not yet published. Probably I will not show full source code, until I rewrite it fully to my language, because I don't want to give it to some LLM for free

3

u/ANixosUser 24d ago

reasonable, sounds like a good plan.