tinyBigGAMES/NitroPascal
:fire: NitroPascal - A modern Object Pascal compiler targeting native code through Zig's C++ backend.
Modern Pascal • C Performance
Write elegant Object Pascal, compile to blazing-fast native code
NitroPascal is a next-generation Pascal implementation that bridges the elegance of Pascal with the raw performance of C. By combining modern language features with low-level optimization capabilities, 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 modern 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 DelphiAST
│ 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 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:
Please check our Contributing Guidelines (coming soon) for more details.
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