Ivan FB e2ec4d55b3
feat: replace nim-libp2p protobuf with nim-protobuf-serialization
libp2p was pulled in solely for its `minprotobuf` field codec, dragging
in its full transitive tree (secp256k1, nimcrypto, websock, etc.). Swap
it for nim-protobuf-serialization, whose low-level `codec` module gives
the same protobuf wire primitives without the networking stack.

The wire/snapshot codecs build messages by hand at the field level and
rely on a backward-compatible decode path the type-driven
`Protobuf.encode/decode` API cannot express. To keep that code intact,
`protobufutil.nim` is a thin `ProtoBuffer` shim over the new `codec`
module, preserving the exact field-level behaviour the codecs depend on
(plain varints, length-delimited bytes/strings with no UTF-8 validation,
unknown-wire-type fields skipped as protoc does).

Dependency closure (nimble.lock, nix/deps.nix) regenerated accordingly:
libp2p and its 8 exclusive transitive deps dropped, protobuf_serialization
and its npeg dependency added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 15:46:14 +02:00
..
2026-04-10 14:23:30 +02:00

Usage

Shell

A development shell can be started using:

nix develop

Building

To simply build you can use:

nix build '.#libsds'

It can be also done without even cloning the repo:

nix build github:waku-org/nim-sds
nix build github:waku-org/nim-sds#libsds-ios
nix build github:waku-org/nim-sds#libsds-android-arm64"

Or as a flake input.