fix format

This commit is contained in:
fryorcraken 2025-10-21 11:39:02 +11:00
parent d67b42c7f2
commit 531b001862
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 13 additions and 14 deletions

View File

@ -1,4 +1,3 @@
# begin Nimble config (version 2)
when withDir(thisDir(), system.fileExists("nimble.paths")):
include "nimble.paths"
@ -9,4 +8,4 @@ import os
let rlnLib = getCurrentDir() / "build" / "librln.a"
echo "RLN lib path: ", rlnLib
switch("passL", rlnLib)
switch("passL", "-lm")
switch("passL", "-lm")

View File

@ -1,12 +1,11 @@
# Package
version = "0.1.0"
author = "fryorcraken"
description = "Test Waku with nimble"
license = "MIT"
srcDir = "src"
bin = @["example"]
version = "0.1.0"
author = "fryorcraken"
description = "Test Waku with nimble"
license = "MIT"
srcDir = "src"
bin = @["example"]
# Dependencies
@ -21,14 +20,14 @@ proc ensureRln(libFile: string = "build/librln.a", version = "v0.8.0") =
echo "Building RLN library..."
let buildDir = parentDir(parentDir(getCurrentDir())) & "/vendor/zerokit"
let outFile = libFile
let outDir = parentDir(outFile)
if not dirExists(outDir):
mkDir(outDir) # Ensure build directory exists
mkDir(outDir) # Ensure build directory exists
exec "bash ../../scripts/build_rln.sh " & buildDir & " " & version & " " & outFile
else:
echo "RLN library already exists: " & libFile
before build:
ensureRln()
ensureRln()

View File

@ -6,8 +6,9 @@ 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 =
NodeConfig.init(protocolsConfig = ProtocolsConfig.init(entryNodes = @[], clusterId = 42))
let config = NodeConfig.init(
protocolsConfig = ProtocolsConfig.init(entryNodes = @[], clusterId = 42)
)
# Create the node using the library API's createNode function
let node = (await createNode(config)).valueOr: