r rin C-shaped systems language

rin

: [] <> () -> {}

A small systems language that compiles to readable C.

  • One declaration shape. name: kind = value, for variables, structs, enums and procs alike. Read left to right, always.
  • A simple module system. import "file.rin" and that file's symbols are yours. Transitive, cycles diagnosed, no headers to keep in sync.
  • Lengths travel with memory. []T slices carry their length, so indexes are checked wherever it is known. *T is one value; [*]T is C's raw pointer.
  • Generics & reflection. Instantiated per type while compiling, with a record describing every type that asks for one. No macros.
  • Arena allocators. Ask once, hand out pieces, release the whole thing at once. array, vec, map and the rest of std allocate from the arena you pass them.
  • The debugger points at your source. Machine-code line tables name the .rin file, not the generated C.
Language tour

Start here

Twenty lessons, in order

Each one is a short program that compiles, runs, and teaches a single thing about how the machine works. It opens with what the language is and how to install it.

Open the lessons

Compiler architecture

Language tooling shaped around systems work

rin keeps generated C readable and exposes the memory model instead of hiding it. Monomorphization, compile-time reflection, arena-aware containers, and source-level debug information support engine and tools code without introducing a heavy runtime.

Readable C outputInspect generated code, compile with established toolchains, and debug the source that was authored.
Compile-time specializationGenerics are instantiated per type, keeping data layout and generated behavior concrete.
Explicit allocationStandard containers accept the arena that owns their memory and follow product-specific lifetime rules.

Production systems

Need a compiler, code generator, or engine toolchain?

I offer custom work on systems where language tooling, runtime architecture, and production constraints must be designed together.

Work With Me