About Krypton

A small, opinionated programming language built around one idea: compile straight to native code, in itself, with no toolchain underneath.

Why Krypton exists

Most modern languages stand on a tall stack: an LLVM backend, a host C compiler, a system linker, a runtime in another language, a package manager, an editor plugin in yet another language. That stack works, but it’s expensive to understand and impossible to read end-to-end.

Krypton is the smaller answer. The compiler is written in Krypton. It emits ELF, PE, and Mach-O binaries directly — hand-rolled instruction encoding, direct system calls on Linux, ad-hoc SHA-256 code signing on macOS. There is no C compiler, no linker, no LLVM, no runtime written in another language. kcc.sh source.k takes your program from text to executable using only the binaries that shipped in the repo.

That’s the whole pitch. Everything else — the syntax, the builtins, the standard library — is in service of keeping that promise simple and the compiler readable.

Design principles

No C in the loop

Every supported platform has its own native backend, written in Krypton, that emits machine code directly. The C-emit path exists for portability and debugging but is never the default.

Self-hosting first

The compiler compiles itself byte-for-byte. Any language change that breaks self-host doesn’t ship. This forces the implementation to stay small and the language to stay practical.

One value type

Every value is a string at runtime. Numeric strings are added by +; non-numeric ones are concatenated. There is no coercion machinery to learn, and the entire runtime ABI is char *.

Small surface

The whole language fits in a single EBNF page. The compiler is under 5,000 lines of Krypton. A motivated reader can finish both in an afternoon.

Cross-platform from day one

Linux, Windows, and macOS each get their own native backend in lockstep with the language. No platform is a second-class citizen.

Boring where it counts

func, if/else, while, for-in, match, try/catch, structs, string interpolation. Anyone who has written C, Go, or JavaScript can read Krypton on the first try.

Where we are

Krypton crossed its 1.0.0 milestone — “native compilation without an external C compiler” — in March 2026. Subsequent 1.x releases brought macOS arm64 native support, the bracketless jxt import syntax, the env / struct / reverse runtime builtins, and ~150 functions across I/O, strings, numbers, lists, maps, structs, and floats.

The current release ships:

  • Three native backends — ELF (Linux), PE/COFF (Windows), Mach-O (macOS arm64)
  • A self-hosting compiler (~5000 lines of Krypton)
  • ~36 standard library modules
  • 84 example programs, 35 textbook algorithm implementations, 25 tutorial lessons
  • A 38-test suite, all green natively
  • VS Code syntax-highlighting extension

Where we’re going

The 1.5 line is focused on cross-platform parity for the new runtime builtins, native module imports (so import "stdlib/json.k" works without the C path), and dropping the gcc bootstrap dependency entirely.

Beyond that — ARM64 native backend for Linux, lambdas as first-class values in the native pipeline, a real garbage collector to replace the bump arena, concurrency primitives, an LSP server for editor integration, and eventually a quantum-computing backend (the keywords quantum, qpute, process, measure, and prepare have been reserved since v0.1).

Credits

Krypton is developed by t3m3d under the KryptonBytes umbrella. The project is open source under the Apache 2.0 license.

View on GitHub