📌 pxx is a moving target — these docs can lag behind the compiler.
PXX
PXX is a from-scratch, self-hosting Pascal-dialect compiler. It is its own linker — it emits final Linux ELF executables directly, with no external assembler or linker in the path — and it compiles itself. Everything down to the runtime and the ELF bytes is its own code, no toolchain dependencies.
PXX is early experimental software. Do not use programs compiled by PXX for security-sensitive, safety-sensitive, financial, legal, medical, or public network-facing work.
Dive is a single-page technical overview of the project, for readers who want the substance without browsing the rest of this documentation first.
Highlights
- Self-hosting. The compiler is written in its own dialect and reproduces itself byte-for-byte.
- Multiple targets. x86-64 (native) plus i386, aarch64, and arm32 cross targets, and bare-metal ESP32 (xtensa / riscv32).
- Multiple frontends. Pascal is primary, but the same backend also compiles C, a Python-like dialect (Nil Python), and its own assembly-source frontend — see Targets.
- Zero-dependency output by default. Programs link no libc and carry no
DT_NEEDEDentries — a static ELF whose only runtime dependency is the Linux kernel. That holds for every frontend, with no flag to remember. - Imports cross language lines without wrappers. One backend, one symbol
table, one import resolver: Nil Python can
import sqlite3straight from the system's C header, Pascal canusesa plain.h, and no FFI declarations, IDL, or generated bindings are involved. Libraries can be linked from the system or compiled in from source — the latter keeps the binary dependency-free. - Own RTL. A from-scratch runtime and standard library with FPC-style naming.
- Debug info.
-gemits DWARF (line tables, function/frame info, locals, types) on all four Linux targets — step, breakpoint, and backtrace under gdb. - Modern Pascal surface. Classes, interfaces, generics, properties (including indexed/default), managed strings, dynamic arrays, exceptions, and more.
- More than "just an executable." Besides a normal linked binary, PXX can
also emit a relocatable object (
--emit-obj,.o) for linking with other toolchains — onx86-64,i386,riscv32andxtensafor compiled sources, and on x86-64 for assembly sources — and an ET_DYN shared library (--shared,.so) on x86-64, for compiled sources as well as the assembly-source frontend.aarch64andarm32have no object writer. The command-line reference has the exact target and source-kind rules. - It builds a bootable system. PXX compiles BusyBox — a 19-applet
configuration including the
ashshell, byte-identical to a GCC build of the same sources across a 132-case differential — and links it with no C library. A minimal Linux system is a bootable BIOS+EFI ISO carrying a stock Linux kernel, that shell, and the PXX compiler, with nothing else on it.
Where to go next
- Dive — a single-page technical overview.
- Install — set up the pinned compiler and
pxxwrapper. - Getting started — compile and run your first program.
- Features — what PXX can do today.
- Language — Pascal basics, the PXX dialect, and FPC compatibility notes.
- Targets — native, cross, ESP32, and cross-language output.
- Standard library — the RTL and PCL units.
- Examples — demo programs included in the checkout, and a minimal bootable Linux system.
- Reference — command line, configuration, limits, and glossary.
These docs are published at https://pxxc.org directly from the project's git repository, https://github.com/yoctobyte/pxx. Found a mistake? The source lives in
docs/— edits there flow to the site.