mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-10 18:03:11 +00:00
chore: fix rln in nimble
This commit is contained in:
parent
82926f9dd6
commit
0ef1a612a1
20
waku.nimble
20
waku.nimble
@ -22,7 +22,7 @@ requires "nim >= 2.2.4",
|
||||
"stint",
|
||||
"metrics",
|
||||
"libp2p == 1.10.1", # Only for Waku v2
|
||||
"web3",
|
||||
"web3#48fb2d4a215c20326b0cb945913b1d614a0564b9",
|
||||
"presto",
|
||||
"regex",
|
||||
"results",
|
||||
@ -31,6 +31,16 @@ requires "nim >= 2.2.4",
|
||||
"quic"
|
||||
|
||||
### Helper functions
|
||||
|
||||
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
|
||||
|
||||
proc buildModule(filePath, params = "", lang = "c"): bool =
|
||||
if not dirExists "build":
|
||||
mkDir "build"
|
||||
@ -52,11 +62,9 @@ proc buildModule(filePath, params = "", lang = "c"): bool =
|
||||
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
|
||||
if not dirExists "build":
|
||||
mkDir "build"
|
||||
# allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims"
|
||||
var extra_params = params
|
||||
for i in 2 ..< paramCount():
|
||||
extra_params &= " " & paramStr(i)
|
||||
exec "nim " & lang & " --out:build/" & name & " --mm:refc " & extra_params & " " &
|
||||
|
||||
ensureRln()
|
||||
exec "nim " & lang & " --out:build/" & name & " --mm:refc " & " --passL:build/librln.a --passL:-L$(getCurrentDir()) " & params & " " &
|
||||
srcDir & name & ".nim"
|
||||
|
||||
proc buildLibrary(name: string, srcDir = "./", params = "", `type` = "static") =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user