pxx
Pxx is a Pascal and C compiler. Written in pascal, it self-hosts and cross-compiles — x86-64, i386, ARM (32 and 64), riscv, xtensa, down to bare-metal ESP32.
Features
- Pascal and C frontends; nilpy (python dialect) staged.
- Self-hosting; highly FPC- and C99-compatible.
- Wrapper-free C import —
uses/importa C header directly, no bindings. - Auto-typing — declare a variable
auto, the compiler infers the type. - libc-free, syscall-only static binaries.
- Cross-compiles to six CPU targets, down to bare-metal ESP32.
- Managed memory (ansistring, dynamic arrays), OOP, coroutines / async.
Design
- From scratch — not a fork. Targets compatibility, verified against gcc / fpc / cpython as oracles.
- No GNU userland, no libc. Both the compiler and the binaries it emits talk
straight to the Linux kernel through syscalls. Building pxx needs only
make, and only for the tests. - One shared IR under every frontend and target.
- Compiles itself in plain linear pascal — no OOP — so fewer features can miscompile the compiler.
Limitations
- Not fully optimized. Output runs about 2× slower than FPC, gcc, or CPython — more on unoptimized float paths.
- Active development, large backlog, expect rough edges.