Nexus Pascal
Nexus Pascal is an Object Pascal compiler and runtime derived from Free Pascal.
The installed nxpc driver selects a compiler backend and matching destination
RTL. Use it directly or through a Nexus Build NXPC operation.
Compile directly
nxpc hello.pas
nxpc -iV
Nexus Build adds project dependencies, explicit settings, and repeatable output locations around compiler invocation. See the first application.
The installed backends are nxpc-i386, nxpc-x86_64, and nxpc-aarch64.
They run on the installed host platform. A backend can support several
destination operating systems.
Use the wider native ecosystem
Pascal applications can link compatible C/C++ objects and libraries through explicit interoperability declarations and linker inputs. Nexus Build can build the native producers as dependencies of the Pascal project and supply their published lookup paths. Existing native implementations can therefore stay in their original languages while Pascal owns the application.
See native project integration for the NXArchive and Nexus Gear examples. Building and linking a C++ library does not make its arbitrary classes/interfaces directly consumable from Pascal; compatible bindings or wrappers remain necessary.
Destination selection
nxpc -Pi386 -Twin32 hello.pas
nxpc -Paarch64 -Tandroid hello.pas
These select compiler destinations. Linking a complete application also requires its platform libraries, SDK/sysroot, and application packaging. A supplied RTL alone does not provide those dependencies.
The release includes thirteen RTL destinations:
| OS | CPUs |
|---|---|
| Linux | i386, x86_64, aarch64 |
| Windows 32-bit | i386 |
| Windows 64-bit | x86_64, aarch64 |
| Android | x86_64, aarch64 |
| macOS / Darwin | x86_64, aarch64 |
| iOS simulator | x86_64, aarch64 |
| iOS | aarch64 |
See platform support for runtime-validation limits.
Compiled artifacts
Nexus Pascal uses .nxu compiled units and .nxp package metadata.
These are distinct from upstream FPC formats. Rebuild the compiler, RTL,
application units, and package SDK together when compatibility changes.
Do not rename or reuse upstream compiled units as Nexus Pascal units. Prefer a matching release over manually mixing compiler and runtime files. See runtime packages.
Floating-point behavior
On supported x86 targets, Pascal Extended uses hardware binary80, including
Windows x64. On ARM, Extended is Double. There is no general software binary80
constant evaluator.
The Windows C ABI is a separate boundary: CExtended remains Double.
Pascal interfaces exposing Extended require matching Nexus tools.
C varargs cannot carry Pascal binary80; use an explicit Double conversion when
that is the intended call contract.
Compiler constant folding uses the compiler host's native Extended arithmetic. Official x86 compiler construction therefore uses an x86 host. The Windows cold bootstrap starts with the Win32 FPC seed; the native Windows x64 compiler must not be seeded using stock Win64 FPC's Double-sized Extended.
Currency and Comp retain their integer-backed Win64/ARM representation. Enabling Pascal binary80 does not enable the coupled x87 Currency/Comp behavior. Native transcendental results follow the host RTL mathematics; the retained high-precision reference corpus is a comparison tool, not a software-evaluator guarantee.
Configuration and upstream differences
Nexus Pascal uses nxpc.cfg and Nexus-specific installation/environment names,
including NXPC_CONFIG_PATH, NXPC_EXEC_PATH, NXPC_ERROR_FILE, and
NXPCDIR.
Platform unit-directory overrides likewise use the NXPC_ prefix, for example
NXPC_LINUXUNITS and NXPC_WIN64UNITS. These installation names are separate
from retained FPC language modes and source compatibility symbols.
Upstream Pascal documentation remains useful background, but it does not define every Nexus Pascal switch, platform, or binary contract. Nexus has removed obsolete targets/options and made deliberate language/runtime changes. Consult the source reference and its language-rule record for those differences.
To build Nexus Pascal itself, use the bootstrap guide. Stock FPC 3.2.2 is a seed prerequisite, not the compiler for normal Nexus builds.