tinyBigGAMES/NitroPascal
π₯ NitroPascal - A modern Object Pascal compiler targeting native code through Zig's C++ backend.
Modern Pascal β’ C Performance
Write elegant NitroPascal, compile to blazing-fast native code
Website β’ Documentation β’ Examples β’ Contributing
NitroPascal is a next-generation Pascal compiler that bridges the elegance of Object Pascal with the raw performance of C. By transpiling Object Pascal code to optimized C++, NitroPascal aims to deliver the best of both worlds: readable, maintainable code that doesn't sacrifice speed.
NitroPascal takes a revolutionary approach to achieving C-level performance: transpilation. Instead of interpreting or compiling directly to bytecode, NitroPascal transpiles Object Pascal code into highly optimized, idiomatic C++. This intermediate C++ representation is then compiled using Zig as a drop-in C++ compiler, with the entire build orchestrated through build.zig, unlocking:
By standing on the shoulders of the C++ ecosystem while leveraging Zig's modern toolchain and preserving Pascal's elegance, NitroPascal delivers truly uncompromising performance without sacrificing developer productivity.
NitroPascal's compilation pipeline transforms your Pascal code through multiple stages for optimal performance:
βββββββββββββββββββ
β Object Pascal β Write clean, modern Pascal code
β Source β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β NitroPascal β Parse and analyze with custom parser
β Transpiler β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Optimized C++ β Generate idiomatic, optimized C++
β Code β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Zig Compiler β Compile with Zig (drop-in C++ compiler)
β (LLVM Backend) β Leverage LLVM optimizations
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β Native Binary β Lightning-fast executable
β Multi-Platform β
βββββββββββββββββββ
See how elegant Object Pascal code transforms into optimized C++:
| Object Pascal Source | Generated C++ Code |
|---|---|
|
|
Pascal has always been celebrated for its clarity and strong typing, making it an excellent choice for teaching and building reliable software. However, performance-critical applications have traditionally gravitated toward C/C++. NitroPascal challenges this dichotomy by:
Download the latest release from the Releases page. All dependencies are bundled - no separate installations required!
Note: NitroPascal is currently under active development. Check the releases page for the latest version!
We welcome contributions! NitroPascal is in active development and there are many ways to help:
NitroPascal is licensed under the BSD-3-Clause License.
The BSD-3-Clause license is a permissive open-source license that provides you with:
This means you can use NitroPascal to build both open-source and proprietary applications without worrying about licensing conflicts. The only requirements are to include the copyright notice and disclaimer in distributions.
NitroPascal builds upon excellent open-source projects:
See THIRD-PARTY.md for complete attribution.
Currently Under Construction ποΈ
NitroPascal is in active development. Star the repo to stay updated!
Built with passion for performance and elegance β‘
Β© 2025-present tinyBigGAMESβ’ LLC β’ All Rights Reserved