r/Compilers • • Oct 30 '26

I built Eskiu, a self-hosting systems language. It now has its own ARM64 code generator alongside LLVM.

Hi r/Compilers,

I've been working on Eskiu, a statically typed systems programming language with C-like syntax, explicit memory management, generics, interfaces, async/await, and native C interoperability.

I originally learned programming with Ruby, but the more software I built, the more I found C underneath everything, including Ruby and Python themselves. Over time, I came to appreciate C's simplicity and directness.

Rust and Zig are well-designed languages, but for the kind of work I do, I wanted something simpler to learn and adopt while retaining low-level control.

So I started building Eskiu.

What began as a personal project has since grown into a language I use in production software at ReactVision, as well as in a digital identity platform. These real-world applications have pushed me to focus on reliability, performance, interoperability, and tooling rather than language features alone.

I wanted to share a few compiler milestones that might interest this community.

Self-hosting

Eskiu has two compiler implementations: the original C++ compiler and a compiler written in Eskiu itself.

Both are tested for parity, and the self-hosted implementation undergoes a three-stage bootstrap to verify that it can compile itself consistently.

EIR (Eskiu Intermediate Representation)

One of the more interesting parts of the project has been developing EIR, an intermediate representation that provides an alternative compilation pipeline.

With version 0.14.1, Eskiu gained native backends capable of generating ARM64 assembly and C99 without going through LLVM's code generator.

LLVM remains the default backend, but EIR can now produce native executables through its own compilation path.

The ARM64 backend handles calling conventions, C ABI interoperability, structures passed and returned by value, closures, and exception handling through a small runtime.

The new backends are still evolving, and LLVM remains considerably more mature in terms of optimisation.

Correctness and performance

I've also been working on compiler correctness and benchmarking.

I ported all 50 LangArena benchmarks to Eskiu. Both compiler implementations produce matching results across the suite, and on the 39 algorithmic benchmarks, Eskiu's performance is broadly comparable to C in my local measurements.

These aren't official LangArena leaderboard results, but they've been useful for identifying optimisation opportunities and regressions.

Recent improvements include LLVM loop and SLP vectorisation, faster JSON and regex implementations, and fixes for alignment-sensitive memory accesses.

Why I'm sharing this

I'm not trying to build a replacement for C, Rust, or Zig. Eskiu is simply the language I wanted to use, and building its compiler has been an incredibly rewarding engineering experience.

I'm particularly interested in hearing from people who have worked on compiler backends, intermediate representations, and self-hosting.

How have you approached validating a custom code generator against an established backend like LLVM? And at what point do you think maintaining an independent backend becomes worthwhile?

Links:

I'd appreciate any technical feedback, criticism, or suggestions.

Thanks for reading!

0 Upvotes

12 comments sorted by

11

u/AustinVelonaut Oct 30 '26

Dead Internet Theory is proven true more and more. An LLM-generated posting pointing to an LLM-generated compiler, and commented upon by an LLM in the comments.

Reminds me of the joke about the future robot factory: a dark warehouse filled with thousands of working robots, run by a man and a dog. The man's job is to feed the dog. The dog's job is to bite the man if he tries to mess with the robots.

-2

u/akaDrimer Oct 30 '26

I understand the point and I share the concern, but this isn't the case here.

Thanks for your opinion though.

5

u/AustinVelonaut Oct 30 '26

All of the comments in the code I looked at appear to be LLM-generated, as does the README, so what parts did you actually write?

0

u/[deleted] Oct 30 '26

[deleted] — view deleted comment

4

u/Inconstant_Moo Nov 01 '26

But when an AI writes code, and someone dumps it here, who should we be talking to about compilers? The person who pasted the GitHub link? But what would they know about compilers?

0

u/FrostyMatters 29d ago edited 29d ago

Again, you can just talk to the person and find out or examine the compiler. Stay on r/programminglanguages if you want to be shielded from anything ai. I don’t understand this obsession with coding as if that’s the only thing that matters when it comes to compilers.

4

u/Inconstant_Moo 29d ago

Yes, but what information would talking to the person elicit, if they didn't write the compiler and don't know how to write one? What is there to say?

"How does this bit of the compiler work?"

"I don't know, I didn't write it."

"Why did you make this design choice?"

"I didn't."

"What use-case does your language try to meet?"

"I can say 'wrote a compiler' on my CV."

"Looking back, what did you learn?"

"How much it costs to get Claude to write a compiler for me."

"Any tips for other langdevs?"

"You're wasting your time with langdev? Just tell an AI to do it for you, bro."

If I was contemplating using a piece of software, then maybe it doesn't matter whether it was written by a human or an AI. But if, as in this subreddit, what I'm mainly contemplating is discussing the project with its author, then that does matter. Because if it was written by an AI, then the author isn't posting here.

0

u/Trave11er3427 Oct 30 '26

congrats on your launch. 🎉 I’m near finishing my new language as well and it’s encouraging to see people like you that are 2 steps ahead of me. you stuck it out and launched! so, how long did it take you to get this far, from start to today? also I’m curious how you mapped your EIR to LLVM? (I’ve found that parsing the language into my own IR was easy, lowering it to C++ was difficult but I managed it, but lowering my IR to LLVM has been a quite a challenge.) did you create a mapping table and an engine to lower it automatically, or did you lower it by hand for each EIR node, or some combo of that?

0

u/akaDrimer Oct 30 '26

Thanks! About 2 years, with lots of failures in the journey.

I didn't map EIR to LLVM, the opposite. C++ compiler uses LLVM API directly, selfhost emits LLVM IR text + calls clang. EIR sits after frontend, then backends consume it: ARM64, C99, or LLVM. I lower by hand for each node, no table.

Happy to help if you want, feel free to DM. Good luck with your launch, sticking it out is the hardest part!

1

u/Trave11er3427 Oct 30 '26

I learned in the lowering my IR to C++ that there’s so many context things required and that node by node doesn’t really work well. so I took the idea of from real language translation which translates whole sentences or whole paragraphs (idea by idea translation). I first built a small language translation engine between english and french that takes samples from each and loads a dictionary. when called it uses context to select the proper translation. then i changed it to reuse that engine and build a dictionary from my IR to LLVM going IR sentence by sentence. it works really well thus far but some things have slowed me down, like optimization injections in method invokes, declare headers, and data footers. i’m about 75% done. (i felt that doing it by hand was evolving too much as i was learning, and my earlier work didn’t keep up with my newest work so the quality wasn’t there.)

-4

u/[deleted] Oct 30 '26

[removed] — view removed comment

0

u/akaDrimer Oct 30 '26

Honest reason for EIR is just learning. LLVM does the job perfectly and remains the default in 0.14.1.

I wanted to understand how ARM64 calling conventions, structs by value, closures and exception handling work myself. It has no release date and won't ship until ready or maybe it won’t 😅