nim-sds/reliability.nimble

36 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-10-14 15:05:19 +04:00
# Package
version = "0.1.0"
author = "Waku Team"
description = "E2E Reliability Protocol API"
license = "MIT"
srcDir = "src"
2024-10-14 15:05:19 +04:00
# Dependencies
requires "nim >= 2.0.8"
2024-10-14 15:05:19 +04:00
requires "chronicles"
2024-11-29 14:07:24 +04:00
requires "libp2p"
2024-10-14 15:05:19 +04:00
# Tasks
2024-10-14 15:05:19 +04:00
task test, "Run the test suite":
exec "nim c -r tests/test_bloom.nim"
2025-03-13 22:58:55 +05:30
exec "nim c -r tests/test_reliability.nim"
task bindings, "Generate bindings":
proc compile(libName: string, flags = "") =
2025-04-20 01:08:11 +05:30
exec "nim c -f " & flags & " -d:release --app:lib --mm:refc --out:" & libName &
" --outdir:bindings/generated bindings/bindings.nim"
2025-03-13 22:58:55 +05:30
# Create required directories
mkDir "bindings/generated"
when defined(windows):
compile "reliability.dll"
elif defined(macosx):
compile "libsds.dylib.arm",
"--cpu:arm64 -l:'-target arm64-apple-macos11' -t:'-target arm64-apple-macos11'"
compile "libsds.dylib.x64",
"--cpu:amd64 -l:'-target x86_64-apple-macos10.12' -t:'-target x86_64-apple-macos10.12'"
2025-03-13 22:58:55 +05:30
exec "lipo bindings/generated/libsds.dylib.arm bindings/generated/libsds.dylib.x64 -output bindings/generated/libsds.dylib -create"
else:
compile "libsds.so"