nim-chat-sdk/chat_sdk.nimble

48 lines
1.4 KiB
Plaintext
Raw Normal View History

2025-05-09 13:56:39 +08:00
# Package
version = "0.0.1"
author = "Waku Chat Team"
description = "Chat features over Waku"
license = "MIT"
srcDir = "src"
2025-05-09 13:56:39 +08:00
2025-06-23 14:48:59 +03:00
### Dependencies
2025-10-28 17:44:43 +08:00
requires "nim >= 2.2.4",
"chronicles",
"chronos",
"db_connector",
"flatty",
"waku#799793dba7ef78eba41582ed55db01a2d5d7500a",
"noiseprotocol >= 0.0.2"
2025-09-10 12:04:10 +08:00
proc ensureRln(libFile: string = "build/librln.a", version = "v0.7.0") =
if not fileExists(libFile):
echo "Building RLN library..."
let buildDir = getCurrentDir()
let outFile = libFile
exec "bash ./scripts/build_rln.sh " & buildDir & " " & version & " " & outFile
else:
echo "RLN library already exists: " & libFile
task buildSharedLib, "Build shared library for C bindings":
2025-07-06 13:35:33 +03:00
exec "nim c --mm:refc --app:lib --out:../library/c-bindings/libchatsdk.so chat_sdk/chat_sdk.nim"
task buildStaticLib, "Build static library for C bindings":
exec "nim c --mm:refc --app:staticLib --out:../library/c-bindings/libchatsdk.a chat_sdk/chat_sdk.nim"
2025-07-04 15:08:45 +08:00
task migrate, "Run database migrations":
exec "nim c -r apps/run_migration.nim"
task segment, "Run segmentation":
exec "nim c -r chat_sdk/segmentation.nim"
2025-09-04 17:16:51 +08:00
task subscribe, "Run waku subscription service":
2025-09-10 12:04:10 +08:00
ensureRln()
exec "nim c --passL:build/librln.a --passL:-lm -r apps/waku_subscriber.nim"
2025-09-04 17:16:51 +08:00
2025-09-10 12:18:31 +08:00
task publishing, "Run waku publishing service":
exec "nim c --passL:build/librln.a --passL:-lm -r apps/waku_publisher.nim"
2025-10-28 17:44:43 +08:00
task noise, "Run noise protocol demo":
exec "nim c -r apps/noise.nim"