19 Commits

Author SHA1 Message Date
Ivan FB
d9d70cc2fe
fix: bump nim-ffi to a66c53a (cwire + foreign-host-concurrency fix)
The cwire-only nim-ffi (7362bfd, the re-pointed v0.2.0-rc.1 tag) crashed
with a foreign-thread GC null-avltree fault inside sds_unwrap_received_message:
that line branched off before the foreign-host-concurrency fix and was
missing the cycle-collector rooting (GC_ref(myLib[])), so the SDS manager
ref could be collected mid-use and fault on a later alloc.

a66c53a is nim-ffi release/v0.2 = cwire + the full fix cherry-picked
(a6b22fc event-listener GC setup + c3d135f context-recycling / GC_ref
rooting). Pinned by immutable SHA (lock + deps.nix + sds.nimble) to avoid
the mutable-tag drift that caused this.

Validated: libsds builds, nimble test green (106/0), and the previously
crashing status-go TestAcceptCRRemoveAndRepeat passes 5/5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 21:25:22 +02:00
Ivan FB
5e272136aa
chore: bump nim-ffi to v0.2.0-rc.1 @ 7362bfd
The v0.2.0-rc.1 tag was re-pointed from c3d135f to 7362bfd (adds the
internal cwire codec + ABI-format annotations; +1.4k lines). The
generated libsds CBOR `sds_*` ABI is unchanged, so this is a drop-in
nim-ffi bump — no nim-sds/library or sds-go-bindings change needed.

- nimble.lock: ffi vcsRevision -> 7362bfd, checksum -> 544b7be2
  (the from-source `setup -l` path).
- nix/deps.nix: ffi rev -> 7362bfd, sha256 -> 0lwyzqcg…
  (the offline Nix build path).

Validated: `nimble test` green (106 OK / 0 failed) and
`nix build .#libsds` SuccessX, both against nim-ffi 7362bfd.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 18:13:34 +02:00
Ivan FB
2a2e549c2b
fix(nix): make the CBOR build Nix-buildable offline
The Nix build pre-populates deps into pkgs2 and can't clone in the sandbox.
nim-ffi isn't in the nimble registry, so requiring it by URL made nimble
re-clone it during resolution (offline -> fail). Resolve ffi by name from the
installed pkgs2 in the Nix build (gated by SDS_NIX_DEPS), keeping the URL fetch
for plain `nimble` builds; the URL now points at the published v0.2.0-rc.1 tag.

Also drop the `nim` entry from the lock (the sandbox can't fetch Nim by SHA),
record numeric lock versions for ffi (0.2.0) and cbor_serialization (0.3.0) so
they resolve cleanly, and regenerate nix/deps.nix to include cbor_serialization.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:45:50 +02:00
Ivan FB
b5d1364d47
feat: replace nim-libp2p protobuf with nim-protobuf-serialization (#77)
Co-authored-by: Esteban C Borsani <ecastroborsani@gmail.com>
2026-06-12 15:08:23 +02:00
Ivan FB
7725beb5e5
start using nim-ffi 0.1.4 (#74) 2026-06-03 09:46:52 +02:00
Siddarth Kumar
980c830415
nix: set nim cache to proper tmp directory
Otherwise we end up with cache collisions like this in CI :

```
 > Error: cannot open '/tmp/nim/libsds_d/@z..@f..@f..@f..@f..@f..
 @ffgber@f6y2zz1uv2lzi4ln2717py8m0aix64u56-avz-hajenccrq-2.2.4@favz
 @fyvo@fflfgrz@frkprcgvbaf.nim.c'
```
2026-05-26 16:01:55 +05:30
Ivan FB
6f49a9742a
add raw no-nix ci.yml (#61)
* adapt arch and cpu flags and fix ios build
* require chronos 4.2.0 or higher
* Android fixes and rm Makefile
* enable long paths in git windows ci
2026-04-10 14:23:30 +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
e301dad197
nix: use Nix Flake from NBS repo to provide Nim
This way we can track same Nim as in vendor folder.

Notably this upgrades from Nim 2.2.4 to 2.2.6.

Depends on:
https://github.com/status-im/nimbus-build-system/pull/112

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2026-02-01 20:53:14 +01:00
Ivan Folgueira Bande
ae445d5585
rename ANDROID_NDK_HOME to ANDROID_NDK_ROOT 2025-11-28 19:34:51 +01:00
cb472bc829
nix: fix Android builds on Darwin platforms
The assert for Android NDK is obsolete. But we also can avoid fetching
the Android dependencies when not building for Android.

Also, lsb-release is a linux-only tool.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2025-10-24 17:27:49 +02:00
a8060c5600
nix: do not add android SDK on aarch64 Darwin
Otherwise it fails with:

error: aarch64-darwin not supported for Android SDK. Use: NIXPKGS_SYSTEM_OVERRIDE=x86_64-darwin

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2025-10-24 12:29:56 +02:00
Ivan Folgueira Bande
f3b084103d
try to add windows in default.nix 2025-10-22 02:33:19 +02:00
Ivan Folgueira Bande
35c0f1964d
nix add all unix status go supported platforms 2025-10-21 02:55:09 +02:00
Ivan Folgueira Bande
27a2caecaf
adjust as per comments 2025-10-15 19:54:09 +02:00
Ivan Folgueira Bande
68dcde059d
adjust as per comments 2025-10-15 19:53:27 +02:00
Ivan Folgueira Bande
8b6b4046fb
adjust 2025-10-15 19:51:02 +02:00
Ivan Folgueira Bande
2f7fc614d2
include header 2025-10-15 19:47:48 +02:00
Ivan Folgueira Bande
87d5716ac6
nix: fix builds of libsds for host and android
For some unknown reason the builds would fail with:

/bin/sh: line 1: clang: command not found

Unless we added Android NDK toolchains/llvm/prebuilt to PATH.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2025-10-15 18:24:02 +02:00