Skip to content

feat(lidl-gen): export logos_module_set_runtime_delegate for in-process hosts (protocol 0.13) - #168

Draft
dlipicar wants to merge 2 commits into
masterfrom
feat/runtime-delegate-export
Draft

dlipicar wants to merge 2 commits into
masterfrom
feat/runtime-delegate-export

Conversation

@dlipicar

Copy link
Copy Markdown
Contributor

The cdylib backend emits the optional logos_module_set_runtime_delegate export that protocol 0.13's in-process hosting uses, and the repo relocks onto that protocol.

Why

A runtime host (liblogos, in a later PR) loads trusted native modules in its own process. Before initialization it hands the module image a runtime delegate (logos_runtime_delegate.h, logos-co/logos-protocol#97). From then on the image's lp_client_* / lp_invoke* / lp_subscribe calls run in the host's runtime as the identity the host admitted. The export is how the host passes it:

LOGOS_MODULE_IMPL_EXPORT int logos_module_set_runtime_delegate(const lp_runtime_delegate_v1* delegate)
{
    return lp_runtime_install_delegate(delegate);
}

Details

  • Not declared in logos_module_impl.h. Backends without it (rust-sdk until its own PR, older modules) stay green in the module-impl ABI check and are hosted in a subprocess only.
  • Guard. MAJOR-aware on 0.13 (MAJOR > 0 || MINOR >= 13), like the other guards, so the ABI check's unifdef resolves it. A feature-macro or _WIN32 guard would leave a conditional it can't resolve and fail the check.
  • Relock. logos-protocol master (8bbc027) → feat/plain-local-inproc (b7518ba, protocol 0.13, stacked on the qt_remote_plain chain in feat: add Qt-free qt_remote_plain transport logos-protocol#96). The flake input goes back to master when those merge.

Tests

  • nix build .#tests: 385/385 on macOS, including the new LidlGenCdylib.TheRuntimeDelegateExportIsGuardedOnProtocol013.
  • checks.aarch64-darwin.module-impl-abi: 12 declared, 13 defined at MINOR=13 in all four configurations; the extra is this export.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

📊 cpp-sdk doc-test report

The real accounts module, run through a logoscore daemon with the whole stack built against this commit of the C++ SDK — rendered alongside the commands actually run and their output (updated each run, commit 47930a6):

Pages can take a minute to update after the run finishes.

dlipicar and others added 2 commits October 3, 2026 09:42
…ss hosts

A native module built against logos-protocol 0.13 now exports the optional
logos_module_set_runtime_delegate, which installs the runtime delegate a
host passes before initialization. From then on the image's client calls
run in the host's runtime as the identity the host admitted; a module
without the export is only ever hosted in a subprocess.

It is not declared in logos_module_impl.h, so backends without it stay
green in the module-impl ABI check, and its guard is MAJOR-aware like the
others so unifdef resolves it.

Relocks logos-protocol onto 0.13 (logos-co/logos-protocol#97) so the tests
and the ABI check see it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dlipicar
dlipicar force-pushed the feat/runtime-delegate-export branch from 4e5f8c8 to cb91ad8 Compare October 3, 2026 12:46
dlipicar added a commit to logos-co/logos-rust-sdk that referenced this pull request Oct 3, 2026
…0.13

A provider scaffold generated for logos-protocol 0.13 or later now defines
the optional logos_module_set_runtime_delegate, which installs the runtime
delegate an in-process host passes before initialization, so the module's
client calls run in the host's runtime as the identity it was admitted as.
The C++ backend emits the same export (logos-co/logos-cpp-sdk#168).

The lp_runtime_install_delegate binding is declared inside the gated block,
as accept_inbound_token's is, so nothing references it below 0.13. At the
current pin the scaffold is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant