Viper is a minimal systems programming language for Windows x64, written entirely in Delphi. It draws from Pascal's structural clarity and Oberon's radical minimalism to produce a language where every feature earns its place.
The compiler includes its own native x64 code generation backend with SSA optimization, a PE/COFF linker, and a source-level DAP debugger. There is no LLVM. There is no GCC. There is no external toolchain. The entire pipeline — from source text to a running native executable — lives in one codebase with zero dependencies beyond the Delphi runtime library.
The result is a compiler small enough that one person can hold the entire architecture in their head, yet capable enough to produce efficient native binaries, dynamic libraries, static libraries, and JIT-compiled functions.
Seven lines. A native Win64 executable. No runtime, no garbage collector, no VM.
module exe test_exe_hello; begin writeln("Hello from Viper!"); end.
Routines support value and reference parameters, overloading by signature, and recursion.
routine add(const a: int32; const b: int32): int32; begin return a + b; end; routine factorial(const n: int32): int32; var result: int32; i: int32; begin result := 1; for i := 1 to n do result := result * i; end; return result; end;
Import C libraries directly. The built-in C importer translates headers into .vpu module units.
module exe test_exe_raylib; @modulepath "../libs/raylib/imports"; import raylib; const CScreenWidth = 800; CScreenHeight = 450; begin raylib.InitWindow(CScreenWidth, CScreenHeight, "Raylib Window"); raylib.SetTargetFPS(60); while not raylib.WindowShouldClose() do raylib.BeginDrawing(); raylib.ClearBackground(raylib.RAYWHITE); raylib.DrawText("Congrats! You created your first window!", 190, 200, 20, raylib.LIGHTGRAY); raylib.EndDrawing(); end; raylib.CloseWindow(); end.
Viper's compiler is structured as three independent layers. Each can be used standalone — you can build an entirely different language on the same engine.
The Frontend is the thinnest layer — three Delphi source files containing grammar, semantic, and emitter registrations. These three files are the entire Viper language definition. Everything else is provided by the Middle Layer and Backend.
src\ViperLang.groupproj in Delphi 12 Athens or later.Viper.exe is output to bin\.| Host OS | Windows 10/11 x64 |
| Build tool | Delphi 12 Athens or later |
| Dependencies | None beyond the Delphi RTL |
| License | Apache License 2.0 |
Viper is built in the open. Whether you're fixing a bug, writing your first program, or just curious about language design, you're welcome.