From 531b001862c4573aa1da3dfb57187cb7574020d0 Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Tue, 21 Oct 2025 11:39:02 +1100 Subject: [PATCH] fix format --- examples/nimble/config.nims | 3 +-- examples/nimble/example.nimble | 19 +++++++++---------- examples/nimble/src/example.nim | 5 +++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/examples/nimble/config.nims b/examples/nimble/config.nims index e34da8afb..29ebdc6f7 100644 --- a/examples/nimble/config.nims +++ b/examples/nimble/config.nims @@ -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") \ No newline at end of file +switch("passL", "-lm") diff --git a/examples/nimble/example.nimble b/examples/nimble/example.nimble index 08bc8090f..c8b62c168 100644 --- a/examples/nimble/example.nimble +++ b/examples/nimble/example.nimble @@ -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() diff --git a/examples/nimble/src/example.nim b/examples/nimble/src/example.nim index fae571336..1ee756ab7 100644 --- a/examples/nimble/src/example.nim +++ b/examples/nimble/src/example.nim @@ -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: