41 Commits

Author SHA1 Message Date
Ivan FB
a5a47f8e6e
feat: port bindings to nim-ffi 0.2.0 snake_case + CBOR libsds ABI
nim-sds built on nim-ffi 0.2.0 exports a new C ABI (snake_case symbols,
CBOR-marshalled requests/responses, named event-listener registry),
which the old PascalCase callback-based bindings could not link against
(undefined reference to SdsWrapOutgoingMessage / SdsUnwrapReceivedMessage).

Rewrite the cgo layer to the new ABI while keeping the Go-facing API
identical so consumers (status-go reliability layer) need no changes:

- sds_schema.go: CBOR structs matching nim-sds library/libsds.nim. The
  .ffi. macro wraps each proc's non-ctx params in a generated request
  object keyed by the param name, so requests are nested ({req:{...}});
  no-extra-param procs take {_placeholder: uint8}.
- sds.go: snake_case wrappers; callback copies the callback-scoped CBOR
  buffer before returning to avoid a use-after-free.
- sds_common.go: event path decodes the CBOR {eventType, payload}
  envelope instead of JSON.
- NewReliabilityManager passes an empty participantId (plain SDS, SDS-R
  repair disabled) to preserve pre-nim-ffi behavior.

Validated: full binding test suite (incl. event callbacks) passes
against a libsds built from nim-ffi 0.2.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 23:11:28 +02:00
Igor Sirotin
d5b47a9119
fix: remove global logger (#9)
fix: remove global logger
2025-12-22 16:45:14 +00:00
Ivan Folgueira Bande
68a4845a10
Simplify sds Makefile as we assume existing libsds library and header 2025-11-25 17:01:57 +01:00
Igor Sirotin
e78f763079
style: cleanup and format 2025-11-19 18:49:07 +00:00
Igor Sirotin
3bcf73b531
feat: sds lint stub 2025-11-19 18:36:37 +00:00
Ivan Folgueira Bande
4399ce6ad9
add git pull master in sds Makefile 2025-10-24 22:31:51 +02:00
Ivan Folgueira Bande
d80dc61ae1
adjust Makefile to make sure nim is always compiled 2025-10-23 01:15:54 +02:00
Ivan Folgueira Bande
911541c82b
properly differenciate between header and lib folders 2025-10-22 00:49:05 +02:00
Ivan Folgueira Bande
b501442965
pass the include and lib based on NIM_SDS_REPO_PATH env var 2025-10-20 23:29:00 +02:00
Ivan Folgueira Bande
20404c85a0
mv echo line to better place in Makefile 2025-10-15 19:12:05 +02:00
Ivan Folgueira Bande
d9e869cfb3
simple change checkout master by default 2025-09-22 16:06:15 +02:00
Ivan FB
f55a9f532e
add windows support 2025-09-11 14:34:11 +02:00
Ivan Folgueira Bande
0b8dddea22
rm generate.go 2025-08-25 22:41:54 +02:00
Ivan Folgueira Bande
83ca70c0c9
fix paths and tabs in sds/Makefile 2025-08-25 18:02:13 +02:00
Ivan Folgueira Bande
f02f338452
update echo for Android in Makefile 2025-08-25 17:54:46 +02:00
Ivan Folgueira Bande
267810e77f
add android support 2025-08-25 17:06:04 +02:00
Ivan Folgueira Bande
45106c938c
better generate.go file 2025-08-21 15:34:15 +02:00
Ivan Folgueira Bande
d9150e87d7
add generate.go file 2025-08-21 13:37:18 +02:00
Akhil
05e797c76b
feat: Add Support for Multiple Channels in Single Reliability Manager (#5) 2025-07-24 15:22:49 +05:30
gabrielmer
be7f61d809
chore: adding sds prefix to exported C procs/types (#4) 2025-06-17 10:00:04 +02:00
jm-clius
9e5250b457
fix: swap to master branch in dependency 2025-05-29 12:28:17 +01:00
Hanno Cornelius
8b403f5b8a
feat: swap dependency branch 2025-05-28 16:05:46 +01:00
Gabriel mermelstein
ccf3beb5ee
adding extra context for reliability manager nil errors 2025-04-25 11:17:25 +02:00
Gabriel mermelstein
780e0423e4
removing print and fixing comments 2025-04-21 13:07:23 +03:00
Gabriel mermelstein
32ea974f2e
adding event tests 2025-04-21 13:04:46 +03:00
Gabriel mermelstein
a785ba85ed
removing waku references 2025-04-16 18:38:09 +03:00
Gabriel mermelstein
d3781a636a
adding callbacks test (not yet working) and little fixes 2025-04-16 17:24:37 +03:00
Gabriel mermelstein
b9f1d74a78
registering callbacks 2025-04-16 14:06:55 +03:00
Gabriel mermelstein
8eef70bd67
including make update to the makefile 2025-04-16 13:02:00 +03:00
Gabriel mermelstein
53419ac819
parsing message ready event 2025-04-16 12:20:11 +03:00
Gabriel mermelstein
94fe0d4919
adding StartPeriodicTasks 2025-04-16 11:51:28 +03:00
Gabriel mermelstein
45e4f122b2
fix copy-paste bug 2025-04-15 19:03:29 +03:00
Gabriel mermelstein
8b5c79b351
initial implementation of dependencies met (not working yet) 2025-04-15 18:28:27 +03:00
Gabriel mermelstein
188ef6faf0
lifecycle test 2025-04-15 17:12:39 +03:00
Gabriel mermelstein
86c8595b0c
adding UnwrapReceivedMessage and removing rm name 2025-04-15 17:07:47 +03:00
Gabriel mermelstein
8ec2883889
adding WrapOutgoingMessage 2025-04-15 13:13:56 +03:00
Gabriel mermelstein
f31ac1a8f7
adding reset function 2025-04-10 14:33:17 +03:00
Gabriel mermelstein
74cffc39dd
adding destroy function and test 2025-04-10 14:11:29 +03:00
Gabriel mermelstein
e4d22bd6cf
adding event callback 2025-04-10 12:45:33 +03:00
Gabriel mermelstein
355de25fec
initial NewReliabilityManager implementation 2025-04-09 19:04:18 +03:00
Gabriel mermelstein
975fd83dd1
adding makefile 2025-04-09 18:20:28 +03:00