nim-presto/presto.nimble

37 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2021-03-02 13:32:20 +00:00
mode = ScriptMode.Verbose
packageName = "presto"
2024-10-30 12:21:32 +00:00
version = "0.1.0"
2021-03-02 13:32:20 +00:00
author = "Status Research & Development GmbH"
description = "REST API implementation"
license = "MIT"
skipDirs = @["tests", "examples"]
requires "nim >= 1.6.0",
2024-10-30 12:21:32 +00:00
"chronos ^= 4.0.3",
2021-03-02 13:32:20 +00:00
"chronicles",
"metrics",
"results",
2021-03-02 13:32:20 +00:00
"stew"
2022-12-09 08:17:13 +00:00
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
let verbose = getEnv("V", "") notin ["", "0"]
let cfg =
" --styleCheck:usages --styleCheck:error" &
2022-12-09 08:17:13 +00:00
(if verbose: "" else: " --verbosity:0 --hints:off") &
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
proc build(args, path: string) =
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
proc run(path: string) =
build " --mm:refc -r", path
if (NimMajor, NimMinor) > (1, 6):
build " --mm:orc -r", path
2021-03-02 13:32:20 +00:00
task test, "Runs rest tests":
run "tests/testall"