3 Commits

Author SHA1 Message Date
Ivan FB
05595e2d92
feat(ffi): target nim-ffi master (v0.2.0) — CBOR + event registry
Port the {.ffi.} wrapper to nim-ffi 0.2.0 (master). 0.2.0 is a breaking
redesign over 0.1.4: events move to a per-context multi-listener registry
(sds_add_event_listener / sds_remove_event_listener) fired via {.ffiEvent.}
emitters, and request/response/event marshalling switches from JSON to CBOR.

- libsds.nim: typed {.ffiEvent.} payloads replace the JSON event modules;
  CBOR handles nesting, so unwrap returns a typed response again. The
  retrieval-hint provider (a C function pointer, not CBOR-encodable) passes
  its address as a uint64 via a {.ffi.} method that stores it in a
  worker-thread threadvar.
- pin nim-ffi to master HEAD by commit. The lock version is kept a clean
  semver ("0.2.0") on purpose: nimble's `#`-prefixed special version in the
  lock breaks `nimble setup -l` (an unquoted `#` truncates the git path),
  so only vcsRevision carries the commit.
- add the new transitive dep cbor_serialization to the lock and nix/deps.nix.
- regenerate libsds.h for the CBOR/registry ABI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 13:22:11 +02:00
Ivan FB
7725beb5e5
start using nim-ffi 0.1.4 (#74) 2026-06-03 09:46:52 +02:00
Ivan FB
0dea35d364
feat: refactor to support building with Nimble (#52)
Changes include:

- Removing all submodules from vendor folder.
- Updating sds.nimble with required depndencies.
- Generating a nimble.lock file using Nimble.
- Updated Nim code to reference depndencies correctly.
- Added nix/deps.nix fixed output derivation that calls Nimble.
- Updated nixpkgs to use 25.11 commit which provides Nimbe 0.20.1.
- Disabled Nix Android builds on MacOS due to Nimble segfault.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2026-02-11 16:32:02 +01:00