Files
lix/doc/manual/rl-next/plugin-files-nix-plugin-entry.md
T
Jade Lovelace adf45deeca plugins: support nix_plugin_entry, do some minor reworks
Plugins are already allowed to fail to load, let's be even more tolerant
of them failing to load by ignoring inaccessible ones with a warning.

This change also significantly reworks the docs for plugins.

This is a tiny extremely partial backport of the C API at
https://github.com/NixOS/nix/pull/8699.

Fixes: https://git.lix.systems/lix-project/lix/issues/740
CC: https://git.lix.systems/lix-project/lix/issues/359

Change-Id: If4ee20c3daaf26c8184a415eef3e20ca5b5e7aef
2025-03-16 16:43:54 -07:00

765 B

synopsis, issues, prs, cls, category, credits
synopsis issues prs cls category credits
Add `nix_plugin_entry` entry point for plugins
fj#740
fj#359
gh#8699
2826
Development
jade
yorickvp

Plugins are an exceptionally rarely used feature in Lix, but they are important as a prototyping tool for code destined for Lix itself, and we want to keep supporting them as a low-maintenance-cost feature. As part of the overall move towards getting rid of static initializers for stability and predictability reasons, we added an explicit nix_plugin_entry function like CppNix has, which is called immediately after plugin load, if present. This makes control flow more explicit and allows for easily registering things that have had their static initializer registration classes removed.