From 07491b28e6f385215be5551ed860c14256ace95c Mon Sep 17 00:00:00 2001 From: Darshan <35736874+darshankabariya@users.noreply.github.com> Date: Thu, 11 Jun 2026 18:08:08 +0530 Subject: [PATCH 1/2] fix: move API module into srcDir so 'import sds' resolves for nimble consumers (#79) --- config.nims | 5 +++++ sds.nim => sds/sds.nim | 2 +- sds/types.nim | 32 ++++++++++++++++---------------- 3 files changed, 22 insertions(+), 17 deletions(-) rename sds.nim => sds/sds.nim (99%) diff --git a/config.nims b/config.nims index fcbd3f8..3186198 100644 --- a/config.nims +++ b/config.nims @@ -1,3 +1,8 @@ +# The package's import root is its srcDir ("sds"), where the API module +# sds.nim lives. Put it on the path so in-repo consumers (tests/, library/) +# resolve `import sds` the same way nimble consumers of the package do. +switch("path", thisDir() & "/sds") + # begin Nimble config (version 2) --noNimblePath when withDir(thisDir(), system.fileExists("nimble.paths")): diff --git a/sds.nim b/sds/sds.nim similarity index 99% rename from sds.nim rename to sds/sds.nim index d2e4907..d91e476 100644 --- a/sds.nim +++ b/sds/sds.nim @@ -1,6 +1,6 @@ import std/[algorithm, times, tables, sets, options] import chronos, results, chronicles -import sds/[types, protobuf, sds_utils, rolling_bloom_filter] +import ./[types, protobuf, sds_utils, rolling_bloom_filter] export types, protobuf, sds_utils, rolling_bloom_filter diff --git a/sds/types.nim b/sds/types.nim index e607114..1c605f6 100644 --- a/sds/types.nim +++ b/sds/types.nim @@ -1,19 +1,19 @@ -import sds/types/sds_message_id -import sds/types/history_entry -import sds/types/sds_message -import sds/types/unacknowledged_message -import sds/types/incoming_message -import sds/types/bloom_filter -import sds/types/rolling_bloom_filter -import sds/types/reliability_error -import sds/types/callbacks -import sds/types/app_callbacks -import sds/types/reliability_config -import sds/types/repair_entry -import sds/types/channel_context -import sds/types/persistence -import sds/types/reliability_manager -import sds/types/protobuf_error +import ./types/sds_message_id +import ./types/history_entry +import ./types/sds_message +import ./types/unacknowledged_message +import ./types/incoming_message +import ./types/bloom_filter +import ./types/rolling_bloom_filter +import ./types/reliability_error +import ./types/callbacks +import ./types/app_callbacks +import ./types/reliability_config +import ./types/repair_entry +import ./types/channel_context +import ./types/persistence +import ./types/reliability_manager +import ./types/protobuf_error export sds_message_id, history_entry, sds_message, unacknowledged_message, incoming_message, From b12f5ee07c5b764303b51fb948b32a4ade1de3b5 Mon Sep 17 00:00:00 2001 From: Darshan <35736874+darshankabariya@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:34:55 +0530 Subject: [PATCH 2/2] fix: relax nim-ffi floor to >= 0.1.3 (only library/ uses it) (#80) --- sds.nimble | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sds.nimble b/sds.nimble index 25f65b4..f98ab4b 100644 --- a/sds.nimble +++ b/sds.nimble @@ -16,7 +16,9 @@ requires "stew" requires "stint" requires "metrics" requires "results" -requires "https://github.com/logos-messaging/nim-ffi >= 0.1.4" +# Only library/ (the FFI wrapper) uses nim-ffi, not core sds/. Keep the floor +# low so core-only consumers aren't forced up; nimble.lock pins library/'s version. +requires "https://github.com/logos-messaging/nim-ffi >= 0.1.3" proc buildLibrary( outLibNameAndExt: string,