NitroPascal v0.2.0
🎯 NitroPascal v0.2.0: The RTL Wrapping Breakthrough
TL;DR
NitroPascal can now compile Delphi syntax directly to high-performance C++ through our innovative Runtime Library (RTL) wrapping strategy. Write pure Delphi, get native C++ performance.
💡 The Breakthrough: RTL Wrapping Architecture
Instead of complex code generation that attempts to map Delphi semantics to C++, we've taken a revolutionary approach: wrap every Delphi construct in a C++ runtime library (under the np::
namespace).
What this means:
- Delphi's
for
loops →np::ForLoop()
- handles inclusive ranges perfectly - Delphi's
div
/mod
→np::Div()
/np::Mod()
- exact Delphi semantics - Delphi's
String
→np::String
- UTF-16 with 1-based indexing, just like Delphi - Delphi's
WriteLn
→np::WriteLn()
- variadic templates, handles any types
The result? The code generator is now trivial - just simple syntax translation. All complexity lives in the RTL, which is written once, tested once, and reused forever.
🎉 What's New in v0.2.0
This release establishes the foundation with comprehensive Delphi language support:
Type System
- Complete scalar types:
Integer
,Boolean
,Char
,Double
,Single
,Byte
,Word
,Cardinal
,Int64
- Complex types:
String
(UTF-16),Pointer
,Record
,Array
(static & dynamic),Set
,Enum
- Full pointer semantics with
New
/Dispose
Operators & Expressions
- Arithmetic:
+
,-
,*
,/
,div
,mod
- Comparison:
=
,<>
,<
,>
,<=
,>=
- Logical:
and
,or
,xor
,not
- Bitwise:
shl
,shr
,and
,or
,xor
- Set operations:
in
,+
,-
,*
Control Flow
- Conditional:
if..then..else
,case..of
- Loops:
for..to..do
,for..downto..do
,while..do
,repeat..until
- All with proper Delphi semantics (inclusive ranges, evaluated-once bounds, etc.)
Functions & Procedures
- Full function/procedure declarations
- Parameter modes:
const
,var
,out
- Result variable handling
- Forward declarations
I/O & System Functions
- Console I/O:
Write
,WriteLn
,Read
,ReadLn
- Memory management:
New
,Dispose
,GetMem
,FreeMem
- String functions:
Length
,Copy
,Pos
,IntToStr
,StrToInt
🔥 Why This Architecture Matters
By wrapping Delphi semantics in C++, we achieve:
- ✨ True Delphi compatibility - not approximations or "close enough"
- ⚡ C-level performance - via Zig's LLVM optimization pipeline
- 🌐 Cross-platform everywhere - Windows, Linux, macOS, embedded, WebAssembly
- 🎯 Simple, maintainable compiler - complexity lives in RTL, not in code generation
- 🔧 Debuggable output - generated C++ is readable and understandable
Write pure Delphi → Get native C++ performance. No compromises.
📚 Documentation
Want to see what's working RIGHT NOW?
- COVERAGE.md - Complete feature checklist: [x] implemented vs [ ] planned
- DESIGN.md - Deep dive into the RTL wrapping architecture
- MANUAL.md - User guide and getting started
Check the docs to see exactly what Delphi syntax you can use today!
🚀 Getting Started
# Clone the repository
git clone https://github.com/tinyBigGAMES/NitroPascal
cd NitroPascal
# Compile your first Delphi program
nitropascal hello.pas
Example Delphi program:
program Hello;
var
i: Integer;
begin
for i := 1 to 10 do
WriteLn('Hello from NitroPascal! Count: ', i);
end.
Compiles to optimized native code via C++ → LLVM → machine code.
🌐 Community
- GitHub: tinyBigGAMES/NitroPascal
- Discord: Join our community
- Issues: Found a bug or have a feature request? Open an issue
🔮 What's Next?
Each update expands the RTL with more Delphi semantics!
What Delphi features do YOU want to see in the next release? Let us know in the discussions!
The future of Pascal is here, and it's wrapped in a beautiful C++ runtime library. 🎁
File Integrity
Files are signed with minisign using this public key:
RWTqBYfsUOCQscb6ZeknLC0On3cvWCVzMzlHamtgXNaDOO4bNs3WCSkV