5 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
3c377fa8ca
bump go to 1.24.0 2025-09-21 22:55:11 +02:00
Gabriel mermelstein
74cffc39dd
adding destroy function and test 2025-04-10 14:11:29 +03:00
Gabriel mermelstein
355de25fec
initial NewReliabilityManager implementation 2025-04-09 19:04:18 +03:00