The Free Pascal Compiler and Lazarus IDE now support dynamic packages, allowing users to create and install components, controls, and extensions without rebuilding the entire IDE. Dynamic packages can be used to develop plugins that expose native Pascal classes and types through dynamic package libraries. They are implemented as standard shared library files for Linux, Windows, and mac OS, containing metadata generated by the compiler.
The runtime includes mechanisms for safely preserving thread variables and managing dynamic types, such as strings and dynamic arrays, between programs and packages. When deploying programs, users can bundle everything into a single executable or divide it into multiple dynamic packages that can be replaced while running, providing a plugin system. Restrictions include unit name conflicts across packages and packages being larger than ordinary shared libraries due to embedded metadata.
The RTL has been enhanced with a new unit, Dyn Pkg Types.pas, to help read information from dynamic packages. Lazarus IDE enhancements include a new progress window that appears outside the IDE during package rebuilds. Dynamic packages provide a plugin system and allow runtime replacement of components, improving the development workflow for Lazarus users.
Source: Hacker News · Summarized by HeadlinesBriefing