A minimal systems programming language with seamless C++ interoperability.
Pascal/Oberon-inspired syntax, compiling to native executables via C++23. Cross-platform targeting Windows, Linux, and macOS.
Pax is a Pascal/Oberon-inspired systems programming language with seamless C++ interoperability. Write Pax code alongside C++ in the same source files—use #include, call C++ functions, and use C++ types directly.
Pax compiles to C++23 via Zig's bundled Clang, providing a completely self-contained toolchain with cross-platform targeting for Windows, Linux, and macOS.
The core philosophy: "If it's not Pax, it's C++—pass through verbatim." This enables gradual adoption and full access to the C++ ecosystem.
module exe HelloWorld; var name: string; begin name := 'Pax'; writeln('Hello from {}!', name); writeln('Welcome to systems programming.'); end.
Everything you need to build cross-platform applications with clean, readable code.
Clean syntax with no redundancy. Just what you need, nothing more.
Readable, structured code inspired by Pascal and Oberon traditions.
Full control with getmem/freemem. No hidden allocations.
Self-contained Zig/Clang compiler. No external dependencies.
Target Windows, Linux, and macOS from a single codebase.
Build executables, DLLs, or static libraries from one codebase.
Use #include, call C++ functions, use C++ types directly.
Methods, inheritance, and virtual dispatch with type extension.
setlength/len with automatic memory management.
UTF-8 and UTF-16 string types with emoji support.
Integrated unit test framework with assertions.
try/except/finally with OS exception support.
Full Language Server Protocol with completions, hover, go-to-definition, rename, and more.
LLDB-DAP debugger with breakpoints, stepping, variable inspection, and interactive REPL.
A comprehensive type system designed for systems programming.
| Type | Size | Description |
|---|---|---|
int8 ... int64 |
1-8 bytes | Signed integers |
uint8 ... uint64 |
1-8 bytes | Unsigned integers |
float32, float64 |
4-8 bytes | Floating point |
boolean |
1 byte | true / false |
string, wstring |
8 bytes | UTF-8 / UTF-16 |
pointer to T |
8 bytes | Typed pointers |
| Declaration | Output | Description |
|---|---|---|
module exe |
.exe | Executable program |
module lib |
.a | Static library |
module dll |
.dll/.so/.dylib | Dynamic library |
See how Pax handles common programming patterns.
type TPoint = record x: int32; y: int32; end; TColorPoint = record(TPoint) color: uint32; end; var p: TColorPoint; begin p.x := 100; p.y := 200; p.color := $FF0000; end.
type TCounter = class Count: int32; method Increment(); begin Self.Count := Self.Count + 1; end; method GetCount(): int32; begin return Self.Count; end; end; var c: pointer to TCounter; begin new(c); c.Increment(); end.
var numbers: array of int32; i: int32; begin setlength(numbers, 10); for i := 0 to len(numbers) - 1 do numbers[i] := i * 2; end; end.
var result: int32; begin try raiseexception('Error!'); result := 1; except result := 0; finally writeln('Cleanup done'); end; end.
module exe WinAPI; routine MessageBoxW( hwnd: pointer; text: pointer to wchar; caption: pointer to wchar; utype: uint32 ): int32; external 'user32.dll'; begin MessageBoxW(nil, L'Hello from Pax!', L'Pax', 0); end.
module exe MyTests; $unittestmode routine Add(const a: int32; const b: int32): int32; begin return a + b; end; begin end. test 'Addition works' begin TestAssertEqual(5, Add(2, 3)); end;
Professional IDE integration and source-level debugging out of the box.
Pax ships with a full LSP implementation that works with VS Code, Neovim, Sublime Text, and any LSP-compatible editor. Get real-time feedback as you type.
// VS Code settings.json { "languageServer": { "pax": { "command": "path/to/PaxLSP.exe", "filetypes": ["pax"] } } }
Debug your Pax code at the source level using LLDB-DAP. Set breakpoints directly in .pax files, step through code, and inspect variables—all mapped back from the generated C++.
var LValue: int32; begin LValue := 40; $breakpoint // debugger pauses here LValue := LValue + 2; writeln("Answer: {}", LValue); end.
Create and run your first Pax project in seconds.
Initialize a new Pax project with one command.
Edit src/MyProject.pax with your favorite editor.
Compile and execute in one step.
Join our community of developers building cross-platform applications with clean, readable code.