r/Compilers • u/niosurfer • Sep 09 '26
A language that feels like Java but compiles to native code
I’ve been working for some time on Ironwood and it would be nice to get some feedback from the community. Ironwood is a language that keeps the familiar Java syntax and object model but compiles ahead of time to native executables, without a JVM, JIT, or garbage collector. So it is very different than GraalVM. Basically GraalVM makes Java native. Ironwood makes native development feel like Java.
It already supports classes, interfaces, exceptions, generics, packages, and compiler-checked memory reclamation. It also deliberately leaves out features such as reflection, autoboxing, varargs, and threads.
This is the first public release, and the project is still early. I’d really appreciate feedback on the overall direction, especially which Java exclusions make sense and which would make the language impractical for you. I'm particular excited about the possibility of a Ironwood-to-Java transparent bridge, so that to execute native code from Java would be like... writing Java :)
The GitHub repo is here: https://github.com/ironwood-lang/ironwood
10
u/DanManPanther Sep 09 '26 edited Sep 09 '26
This is a great project! A few questions:
Do you plan on fixing or replicating quirks Java has? For example overflow before assignment, signed integer overflow wrapping*, etc?
Do you plan on eventually adding threads or some similar feature? If not - why not?
What use cases do you imagine ironwood would be ideal for?
* Edit: It's not Java only, but some languages do not wrap. Or they do not wrap when debugging (Rust. Gossamer). Swift, C++, Zig, Roc...
6
u/Much-Gap2454 Sep 09 '26
No garbage collection? How does that work?
6
u/AustinVelonaut Sep 09 '26 edited Sep 09 '26
Looking at the repo, I'm lost. The organization of the compiler is incredibly "broad and shallow", with over a thousand separate source files, many just a few lines long that just define some structure, for a total of 48K LOC just for the compiler. Is this all LLM-generated? There's an AGENTS.md file at the top.
2
u/seg_lol Sep 09 '26
Research Koka and Perceus.
There is also a long history of Java to Native compilers, see also https://github.com/MobiVM/robovm
1
u/Kadabrium Sep 09 '26
Mojo for java?
1
u/eteran Sep 09 '26
Looks cool. How does the compiler prove safeness around frees and similar? Is there no concept of shared ownership?
1
u/vmcrash Sep 10 '26
Java-like language compiled to native code? Like C#, D or Dart?
But without GC it is no serious alternative to Java.
1
u/arthurno1 Sep 09 '26
If you want a language that feels like Java but compilers to machine code, you could try Common Lisp with SBCL compiler. After all, Java was invented to "drag C++ programmers half-way to the Lisp", according to the creators 😀.
1
u/Amadex Sep 10 '26
kudos for the AI disclaimer and not trying to hide it, sounds interesting even though it's made with extensive AI usage (which I think contributes to making the repo difficult to nagivate and understand for my small human brain).
1
u/nmsobri Sep 10 '26 edited Sep 10 '26
Beef Lang? https://www.beeflang.org/
and from reading the comment you mentioned u were using LLM.. if you can do it, anybody can do it..
3
u/[deleted] Sep 09 '26
[removed] — view removed comment