Flash

Vision

Own the whole stack: one language, from the compiler to the kernel to the shell.

README · Vision · Tutorial · Reference · Cookbook · Setup · Versioning · Changelog · License

--- ## The idea Flash is a systems programming language built for a single, concrete purpose: to rewrite [FlashOS](https://github.com/ajhahnde/FlashOS) — an AArch64 bare-metal kernel and its shell — in a language of its own, and then to compile itself. Most languages are designed first and find their users later. Flash starts from the opposite end. It already has a demanding user — a real operating system that boots on real hardware — and every feature it grows is one that user needs. The language is shaped by the kernel, not the other way around. ## What "done" looks like Three layers, all Flash, all the way down: - **The shell and userland** are written in Flash. - **The kernel** is written in Flash. - **The compiler** is written in Flash, and compiles itself. At that point the stack answers to no language but its own. Zig — the language Flash is born from and first compiles to — has done its job and can step aside. ## Principles - **Earn every feature.** Flash grows only what FlashOS actually needs to express. No speculative generality. - **Never break the running system.** FlashOS boots today, and it must still boot after every step of the migration. Continuity is the constraint that outranks all others. - **Coexist, don't rewrite.** Flash and its host language compile side by side, module by module. There is no flag day. - **Readable by a human.** A program written in Flash should be obvious to someone who has never seen the language, and the compiler's output should be obvious to someone reviewing the migration. - **Own the understanding.** The goal is not merely to have a language, but to understand every layer of it — the same instinct that turned a C kernel into a Zig one, and now turns a Zig one into a Flash one. ## Why FlashOS already proved that a whole stack can be understood end to end. Flash is the next floor of that ambition: not just understanding the operating system, but owning the language it is written in. ## Beyond the rewrite Rewriting FlashOS and self-hosting is the whole of the plan through v1.0. But the discipline that gets there — a minimal core that earns every feature — is also what lets Flash reach further afterward. High-level needs (reference counting, dynamic dispatch, concurrency) are met by *libraries* on that core, not by growing the language, so the same small language that writes a kernel can, in time, write ordinary applications. That wider use comes after self-host, never at its expense: the operating system stays the only feature that has to be earned. --- *This document is the north star — the "why" and the "what". The "how" — the staged, versioned plan — is tracked separately and evolves as the work does.* --- [← Prev: README](README.md) · [Next: Reference →](REFERENCE.md)