mirror of
https://github.com/logos-co/logos-plugin-qt.git
synced 2026-08-27 17:01:11 +00:00
8d6f63cbb8f58d4c2bec5745ede9a5ea844e44d8
Origin was never consulted on the hot path — LogosAPIClient reads its store first and mints only on a miss — so a per-plugin `LogosAPI(origin=name)` was a no-op while this ctor hard-wired `&TokenManager::instance()`. What has to differ is the STORE. The existing ctors now resolve their store through `TokenManager::forIdentity(module_name)`, which returns instance() itself — pointer-identical — for every name nobody has isolated, so no existing caller changes by one byte. New: a ctor taking an explicit store, and `LogosAPI::forIdentity(name)`, which isolates first and then constructs (the required order: a client captures its store by raw pointer) and returns nullptr rather than a half-isolated identity.
logos-plugin-qt
Everything specific to running a Logos module as a Qt 6 plugin, in one repo: the build logic logos-module-builder delegates to, and the runtime that build produces plugins against. Keeping both here is what lets the plugin technology be swapped without touching the module builder or individual modules.
Outputs
| Output | What it is |
|---|---|
lib / rawLib |
The Nix build functions (buildPlugin, buildHeaders, devShellInputs). rawLib takes its Logos deps as arguments; lib pre-fills them from this flake. |
packages.<sys>.cmake-module |
LogosModule.cmake — the CMake half of the plugin build. Also the default package. |
packages.<sys>.logos-qt-host |
The Qt host runtime a plugin links: LogosAPI, LogosAPIProvider, LogosProviderBase + the LOGOS_PROVIDER / LOGOS_METHOD macros, the legacy QtProviderObject adapter, and core/interface.h. Static library, headers, and a find_package(logos-qt-host) config. |
packages.<sys>.logos-qt-host-generator |
Emits the Qt plugin glue around a cdylib module's C ABI (<name>_cdylib_glue.{h,cpp}) from its LIDL contract. |
The first two are pure Nix / CMake and stay that way: nothing reachable from
lib, rawLib or cmake-module mentions the two C++ derivations, so a
consumer that only wants the build functions never realises a Qt or protocol
build to get them.
Layout
lib/ the Nix build functions (buildPlugin, buildHeaders)
cmake/ LogosModule.cmake
cpp/ the Qt host runtime library (logos-qt-host)
core/interface.h the legacy Qt plugin interface (PluginInterface)
qt-host-generator/ the cdylib -> Qt-plugin glue emitter
nix/ derivations for the two C++ outputs
tests/ flake checks
Languages
Nix
49.6%
C++
45%
CMake
3.3%
Shell
1.4%
C
0.7%