nim-json-rpc/json_rpc.nimble

41 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-06-26 19:08:11 +01:00
packageName = "json_rpc"
version = "0.0.2"
2018-03-02 13:01:30 +00:00
author = "Status Research & Development GmbH"
description = "Ethereum remote procedure calls"
license = "Apache License 2.0"
skipDirs = @["tests"]
2018-03-02 13:01:30 +00:00
### Dependencies
requires "nim >= 1.2.0",
2021-11-22 10:09:13 -03:00
"stew",
2018-05-09 15:08:03 +01:00
"nimcrypto",
"stint",
"chronos",
"httputils",
"chronicles",
"https://github.com/status-im/news#status",
"websock",
"json_serialization"
2018-04-11 14:48:34 +03:00
2021-01-07 18:12:27 +07:00
proc getLang(): string =
# Compilation language is controlled by TEST_LANG
result = "c"
if existsEnv"TEST_LANG":
result = getEnv"TEST_LANG"
proc buildBinary(name: string, srcDir = "./", params = "", cmdParams = "", lang = "c") =
if not dirExists "build":
mkDir "build"
exec "nim " & lang & " --out:./build/" & name & " " & params & " " & srcDir & name & ".nim" & " " & cmdParams
2018-04-11 14:48:34 +03:00
task test, "run tests":
2021-11-22 16:25:29 +02:00
buildBinary "all", "tests/",
params = "-r -f --hints:off --debuginfo --path:'.' --threads:on -d:chronicles_log_level=ERROR -d:json_rpc_websocket_package=websock",
cmdParams = "",
lang = getLang()
buildBinary "all", "tests/",
params = "-r -f --hints:off --debuginfo --path:'.' --threads:on -d:chronicles_log_level=ERROR -d:json_rpc_websocket_package=news",
2021-11-22 16:25:29 +02:00
cmdParams = "",
lang = getLang()