mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-03 14:33:12 +00:00
fixing rln
This commit is contained in:
parent
e688a65cc3
commit
b1c7a4a32d
12
examples/nimble/config.nims
Normal file
12
examples/nimble/config.nims
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
# begin Nimble config (version 2)
|
||||
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
||||
include "nimble.paths"
|
||||
# end Nimble config
|
||||
|
||||
import os
|
||||
|
||||
let rlnLib = getCurrentDir() / "build" / "librln.a"
|
||||
echo "RLN lib path: ", rlnLib
|
||||
switch("passL", rlnLib)
|
||||
switch("passL", "-lm")
|
||||
@ -13,3 +13,17 @@ bin = @["example"]
|
||||
requires "chronos"
|
||||
requires "results"
|
||||
requires "waku#da5767a388f1a4ab0b7ce43f3765d20cf1d098ed"
|
||||
|
||||
import os
|
||||
|
||||
proc ensureRln(libFile: string = "build/librln.a", version = "v0.8.0") =
|
||||
if not fileExists(libFile):
|
||||
echo "Building RLN library..."
|
||||
let buildDir = parentDir(parentDir(getCurrentDir())) & "/vendor/zerokit"
|
||||
let outFile = libFile
|
||||
exec "bash ../../scripts/build_rln.sh " & buildDir & " " & version & " " & outFile
|
||||
else:
|
||||
echo "RLN library already exists: " & libFile
|
||||
|
||||
before build:
|
||||
ensureRln()
|
||||
@ -8,7 +8,7 @@ proc main() {.async.} =
|
||||
# Create a basic configuration for the Waku node
|
||||
# No RLN so we don't need to path an eth rpc endpoint
|
||||
let config =
|
||||
newNodeConfig(wakuConfig = newWakuConfig(bootstrapNodes = @[], clusterId = 42))
|
||||
NodeConfig.init(protocolsConfig = ProtocolsConfig.init(entryNodes = @[], clusterId = 42))
|
||||
|
||||
# Create the node using the library API's createNode function
|
||||
let node = (await createNode(config)).valueOr:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user