mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-21 04:00:27 +00:00
The hand-written liblogosdelivery.h / _kernel.h declared the pre-CBOR string ABI, so they lied about the real one -- a C consumer would link against signatures that no longer exist. genBindings already produces the Rust bindings from the Nim source; this adds the C target on the same footing. liblogosdeliveryGenBindingsC emits library/c_bindings/: logosdelivery.h covering the whole surface (messaging, channels and the waku_* kernel procs in one file), plus the nim_ffi_cbor.h / _prelude.h helpers that marshal the CBOR payloads. Params ride as CBOR blobs, matching the library's default ABI and what the Rust crate does internally; the typed C ABI (abi=c) stays available per-proc for later. The two hand-written headers are deleted and nix packaging ships the generated ones. The C examples target the old string ABI and removed headers, so they no longer compile; each is annotated as awaiting a port rather than left with a dangling include that pretends to work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Usage
Shell
A development shell can be started using:
nix develop
Building
To build a Codex you can use:
nix build '.?submodules=1#default'
The ?submodules=1 part should eventually not be necessary.
For more details see:
https://github.com/NixOS/nix/issues/4423
It can be also done without even cloning the repo:
nix build 'git+https://github.com/waku-org/nwaku?submodules=1#'
Running
nix run 'git+https://github.com/waku-org/nwaku?submodules=1#''
Testing
nix flake check ".?submodules=1#"