nim-chat-poc/nim_chat_poc.nimble

52 lines
1.5 KiB
Plaintext
Raw Normal View History

2025-07-04 22:17:31 -07:00
# Package
2025-09-26 15:45:03 +02:00
version = "0.1.0"
author = "jazzz"
description = "An example of the chat sdk in Nim"
license = "MIT"
srcDir = "src"
bin = @["nim_chat_poc"]
2025-07-22 06:40:08 -07:00
2025-07-04 22:17:31 -07:00
# Dependencies
2025-09-26 17:04:32 +02:00
requires "nim >= 2.2.4",
"protobuf_serialization",
"secp256k1",
"blake2",
"chronicles",
"libp2p",
"nimchacha20poly1305", # TODO: remove
"confutils",
"eth",
"regex",
"web3",
"https://github.com/jazzz/nim-sds#exports",
"waku"
2025-09-26 15:45:03 +02:00
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 & " " &
srcDir & name & ".nim"
task waku_example, "Build Waku based simple example":
let name = "waku_example"
buildBinary name, "examples/", " -d:chronicles_log_level='TRACE' "
2025-09-26 11:22:45 -07:00
task nim_chat_poc, "Build Waku based simple example":
let name = "nim_chat_poc"
2025-09-26 13:03:36 -07:00
buildBinary name, "examples/", " -d:chronicles_log_level='INFO' "
task tui, "Build Waku based simple example":
let name = "tui"
2025-09-26 18:40:57 -07:00
buildBinary name, "examples/", " -d:chronicles_enabled=on -d:chronicles_log_level='INFO' -d:chronicles_sinks=textlines[file]"
task bot_echo, "Build the EchoBot example":
let name = "bot_echo"
buildBinary name, "examples/", "-d:chronicles_log_level='INFO' -d:chronicles_disabled_topics='waku node' "