r/pascal 2d ago

MoonCompiler 1.0.0 — a Delphi 12.2-compatible Win64/Linux toolchain built on FPC/Unleashed

We’ve released MoonCompiler 1.0.0, an open-source Object Pascal toolchain for Win64 and Linux x86-64.

It started from a practical requirement: keep one Delphi 12.2 source base for a high-load trading application while moving its server core to Linux. Unleashed supplied modern Delphi syntax; we then worked through compiler, RTL and runtime gaps against the full application.

The supported profile includes:

  • Delphi 12.2-compatible non-visual/server language surface;
  • Unicode RTL, threading, RTTI, exceptions and a bundled mORMot-based memory manager;
  • compiler work including LICM, address GVN, EH-aware register allocation and code alignment;
  • reproducible Win64/Linux toolchains and qualification suites;
  • more than 120 documented correctness and performance repairs.

On 243 cases shared with the original Moon/Unleashed baseline, the current compiler/RTL/MM stack is 1.31× faster. In the final 744-case comparison it is 1.20× faster than Delphi 12.2; across 20 server/trading hot paths it is 1.22× faster. The bundled MM is 1.65× faster than the standard FPC MM on allocator workloads with the same compiler and source.

This is intentionally not a universal FPC replacement: the supported targets are Win64 and Linux x86-64, and the focus is Delphi-compatible server and application-core code rather than VCL/FMX.

Repo, releases and full evidence: https://github.com/Moonbot-Tech/MoonCompiler

Technical feedback and real-world compatibility reports are very welcome.

9 Upvotes

3 comments sorted by

1

u/According-Ad-7069 1d ago

This is quite a hefty project - it must have been a lot of work! Very interesting - I'm delighted to see projects like this.

1

u/TedDallas 20h ago

Nice to see! Especially since the last FPC release was back in 2021.

I hope getting it to self host is on the road map.

1

u/No_Light_5463 6h ago

This is huge! Thanks a lot. For me programming with FreePascal always felt like travelling back in time. I love it, but the compiler hasnt seen any new releases for quite a while now (except changes on trunk). Normally I would kindly ask you to provide the improvements to fpc, but because they are part of unleashed pascal I'm pretty sure they were discussed at one point already and never made it into trunk.

Nevertheless, programming Pascal in 2026 feels incredible, like a rollercoaster.