A minimal systems programming language that compiles to native executables via C99.
Pascal/Oberon-inspired with automatic memory management, self-contained toolchain, and full Windows API access.
Pax is a Pascal/Oberon-inspired systems programming language targeting Win64. It compiles to C via TinyCC with a completely self-contained toolchain—no external dependencies required.
Memory is automatically managed via the Boehm-Demers-Weiser Garbage Collector, freeing you from manual memory management while maintaining systems-level performance.
Configuration is handled through TOML files, providing a clean, readable format for build settings, C header import definitions, and general-purpose application configuration.
module exe HelloWorld; routine printf(const fmt: pointer to char; ...): int32; external 'msvcrt.dll'; var name: string; begin name := 'Pax'; printf('Hello from %s!\n', pointer to char(name)); printf('GC heap: %lld bytes\n', gc_heapsize()); end.
Everything you need to build Windows 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.
Boehm GC handles allocation and cleanup automatically.
Embedded TinyCC toolchain. Single executable distribution.
Call any DLL directly with full Windows API access.
Build executables, DLLs, or static libraries from one codebase.
Compile and execute code in memory without generating files.
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.
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 | Dynamic library |
module jit |
— | In-memory execution |
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 printf('Cleanup done\n'); 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 on routine Add(const a: int32; const b: int32): int32; begin return a + b; end; begin end. test 'Addition works' begin TestAssertEqualInt(5, Add(2, 3)); 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 Windows applications with clean, readable code.