π libFPC v1.0.0 β First Official Release
Weβre excited to announce libFPC v1.0.0, the first official release of the library that brings runtime access to the FreePascal compiler in a powerful, dynamic way.
This release introduces full support for in-memory compilation, DLL/EXE execution, source-from-string, and more!
π Highlights
- β
In-memory DLL loading:
libfpc_deps.dll
is now loaded directly from memoryβno disk I/O. - π Compile from string or file: Thanks to the new
SetProjectSource
, you can now pass source directly as a string. - π Get status and diagnostics: Retrieve error messages, counts, and compiler stats programmatically.
- βοΈ Add metadata: Inject version info, icons, and manifests into your EXE or DLL.
- π§ In-memory execution: Compile and run executables or DLLs directly from memory, ideal for plugins and sandboxing.
π§ Core Enhancements
libfpc_deps.dll
now loads directly from memory- π Renamed
SetPrintEvent
βSetPrintCallback
- β Added:
GetStats
GetErrorCount
GetError(Index)
Easily inspect compilation errors and status programmatically.
π Source Management
- π Introduced
lfpProjectSource
type - π Replaced
SetProjectFilename
with:SetProjectSource
β accepts file or raw stringGetProjectSource
β retrieve the current source
π‘ Thanks Herbert M Sauro for suggesting string-based source support!
βοΈ Output Configuration
- β Added:
SetAddVersionInfo
GetAddVersionInfo
GetVersionInfo
GetDebugMode
Easily control output metadata, debug info, and version details.
- Now supports adding:
- β Icons
- β Version Info
- β Manifests
π§Ή Cache & Execution
- β Added:
ClearCacheDir
SetOutputPathToCacheDir
GetCachedDir
- π Added:
RunEXE
: Compile and run executable from memoryLoadDLL
: Load DLL directly from memory
Enables in-memory dynamic code generation and execution β great for sandboxing or plugin systems.
π‘ Thanks again to Herbert M Sauro for the idea!
π Miscellaneous
- Various internal fixes, refactors, and improvements.
π Summary
libFPC v1.0.0 gives you:
- π§© Flexible source handling (file or string)
- π₯ Runtime compilation & execution
- π‘ No disk writes needed
- π§Ύ Full metadata control
- π§ Post-compilation diagnostics
π― Use it for scripting, plugin systems, dynamic sandboxing, or anything that needs real-time Pascal compilation.
Let us know what you build with libFPC β and stay tuned for whatβs next! π