Could we just do
zig build
to make ErlangCould we just do
zig build --with elixir --with gleam
On Linux, MacOS, Windows, WhateverOS ^_^
© Don't force me to read any Manual, please
Think of Zig as a new kid in the programming world – it's designed to be simple, efficient, and give you a lot of control.
It's unstable and new language but it has a power to make the world better (Just check these guys)
We're betting that its modern approach to building software can bring some fresh air to the Erlang/OTP build process.
Plus, it's just plain fun to try new things!
The current way Erlang/OTP builds itself has been around for a while. While it's robust, it can also be a bit complex and rely on tools that might feel a bit dated.
We're hoping a Zig-based build can offer:
- Cleaner Code: A build system written in Zig could be easier to read and understand.
- Potentially Faster Builds: Zig is known for its speed, so maybe we can shave some time off those build times.
- More Control: Zig gives us fine-grained control over the build process.
- Learning Opportunity: It's a fantastic way to dive deep into both Erlang/OTP and Zig.
The traditional Erlang/OTP build uses configure
scripts (often generated by Autotools) and Makefiles.
This system is powerful but can be hard to debug and extend.
Zig approach aims to replace this entire chain with a single build.zig
file, making the build logic more explicit and hopefully easier to manage.
Think of it as moving from a complex set of interconnected machines to a single, well-designed tool.
kerl
is a fantastic tool for easily downloading and building Erlang/OTP from source.
But it still relies on the standard configure-makefile
system under the hood.
Our project aims to go a step further by replacing that underlying build system entirely with Zig.
So, while kerl
manages the standard build process, we're trying to create a whole new way to build Erlang.
asdf
and mise
are version managers that allow you to easily switch between different versions of programming languages and tools, including Erlang.
They typically rely on the standard build process (often using kerl
or similar).
Our project is focused on changing how Erlang is built, not just managing its versions.
So, in the future, you might even use asdf
or mise
to manage versions built with our Zig system!
Our goal is simple (in theory!): compile the whole Erlang/OTP shebang using only Zig as the build system.
No C compiler needed (fingers crossed!), no more wrestling with Makefiles. Just pure, unadulterated Zig goodness. We're starting with Linux as our test ground.
The Challenges (It Won't Be Easy!):
- Erlang/OTP has a lot of C code.
- The current build system is super complex.
- We need to figure out how to compile Erlang code without a pre-built Erlang (initially).
- Erlang relies on other external software.
We've got more detailed notes on each of these steps in the notes
folder
This is a community effort, and we'd love your help! If you're interested in build systems, language internals, or just want to see if we can pull off this crazy idea, feel free to follow along, contribute, or just offer words of encouragement! Let's build the future of Erlang (with Zig!).