Published
Jik v0.1.0-beta.0: Jik now compiles itself!
Jik now builds its own compiler. With v0.1.0-beta.0, development of the language moves into Jik itself: the compiler written in Jik can compile its own source, while the original C compiler becomes a frozen bootstrap seed. Jik is self-hosted, and its first beta begins a new phase of development.
Jik has become the language used to develop Jik. Its type system, region-based memory model, standard library, and error handling now work together in the program responsible for building the language itself. The compiler is a substantial, practical use of Jik and a foundation for what comes next.
Developing Jik in Jik
Continuing compiler development in Jik makes it much easier to implement new features and explore ideas for the language. Compiler work can use Jik's own abstractions, and improvements to the language can feed back into the way its compiler is developed. The C seed stays frozen; new compiler and language development happens in Jik.
Beta brings two goals: making Jik more reliable and continuing to grow the language. Fixing compiler and support-library issues, expanding tests, and stabilizing existing behavior go alongside exploring and adding new language features and extending the standard library. Self-hosting makes that next phase easier to pursue. Bugs and changes are still expected during beta, and experience from real programs will help guide both fixes and new features.
How Jik builds itself
The compiler in src/jik/ takes Jik source and generates C,
which Clang or GCC turns into an executable. That includes the compiler's
own source: a Jik compiler can build the next Jik compiler through the
same compilation path used for other programs.
The bundled C seed in src/seed/ gets the build started.
For this release, a source build needs Make and Clang or GCC;
it does not require an installed Jik compiler or a compiler download.
The frozen C seed can build the current Jik compiler. As Jik evolves,
future compiler versions may require an earlier Jik compiler to build them.
The release build verifies self-hosting across three stages: the C seed builds stage 1, stage 1 builds stage 2, and stage 2 builds stage 3. Each stage runs the compiler and language tests. Stages 2 and 3 must generate byte-for-byte identical C for the compiler, both with and without the embedded runtime. The release archive packages the tested stage-2 executable.
This gives compiler development a repeatable check: successive self-hosted compilers must agree on the C they produce for themselves.
Try it and help shape the beta
See the installation guide to get started,
explore the language overview, or
browse the examples. To inspect how Jik
compiles itself, start with src/jik/main.jik in the
compiler repository.
If you find a bug, please open an issue with a small reproducer, your platform, and the compiler version. You can also share what you are building and discuss the beta on Discord.