2021-06-27 06:35:36 +00:00
|
|
|
## nim-websock
|
2023-06-10 05:15:16 +00:00
|
|
|
## Copyright (c) 2023 Status Research & Development GmbH
|
2021-06-20 04:27:50 +00:00
|
|
|
## Licensed under either of
|
|
|
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
|
|
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
|
|
## at your option.
|
|
|
|
## This file may not be copied, modified, or distributed except according to
|
|
|
|
## those terms.
|
|
|
|
|
2021-06-27 06:35:36 +00:00
|
|
|
packageName = "websock"
|
2021-06-23 08:47:31 +00:00
|
|
|
version = "0.1.0"
|
|
|
|
author = "Status Research & Development GmbH"
|
2020-12-01 12:43:59 +00:00
|
|
|
description = "WS protocol implementation"
|
2021-06-23 08:47:31 +00:00
|
|
|
license = "MIT"
|
|
|
|
skipDirs = @["examples", "tests"]
|
2020-12-01 12:43:59 +00:00
|
|
|
|
2023-06-10 05:15:16 +00:00
|
|
|
requires "nim >= 1.6.0"
|
2024-01-22 12:08:17 +00:00
|
|
|
requires "chronos#head"
|
2020-12-07 19:47:45 +00:00
|
|
|
requires "httputils >= 0.2.0"
|
2021-12-16 13:26:49 +00:00
|
|
|
requires "chronicles >= 0.10.2"
|
2021-03-11 03:34:14 +00:00
|
|
|
requires "stew >= 0.1.0"
|
|
|
|
requires "nimcrypto"
|
2021-04-13 22:05:58 +00:00
|
|
|
requires "bearssl"
|
2021-11-22 17:15:26 +00:00
|
|
|
requires "zlib"
|
2020-12-01 12:43:59 +00:00
|
|
|
|
2021-03-18 15:30:21 +00:00
|
|
|
task test, "run tests":
|
2022-06-20 07:19:38 +00:00
|
|
|
let
|
|
|
|
envNimflags = getEnv("NIMFLAGS")
|
|
|
|
nimFlags = envNimFlags &
|
|
|
|
" --verbosity:0 --hints:off --hint:Name:on " &
|
2023-06-10 05:15:16 +00:00
|
|
|
"--styleCheck:usages --styleCheck:error" &
|
2022-07-21 15:38:13 +00:00
|
|
|
" -d:chronosStrictException"
|
2022-01-02 04:49:29 +00:00
|
|
|
|
2021-06-25 05:46:57 +00:00
|
|
|
# dont't need to run it, only want to test if it is compileable
|
2022-06-20 07:19:38 +00:00
|
|
|
exec "nim c -c " & nimFlags & " -d:chronicles_log_level=TRACE -d:chronicles_sinks:json --styleCheck:usages --styleCheck:hint ./tests/all_tests"
|
2021-06-25 05:46:57 +00:00
|
|
|
|
2022-06-20 07:19:38 +00:00
|
|
|
exec "nim c -r " & nimFlags & " --opt:speed -d:debug -d:chronicles_log_level=INFO ./tests/all_tests.nim"
|
|
|
|
rmFile "./tests/all_tests"
|
2021-06-01 02:39:14 +00:00
|
|
|
|
2022-06-20 07:19:38 +00:00
|
|
|
exec "nim c -r " & nimFlags & " --opt:speed -d:debug -d:chronicles_log_level=INFO ./tests/testwebsockets.nim"
|
2021-06-01 02:39:14 +00:00
|
|
|
rmFile "./tests/testwebsockets"
|
|
|
|
|
2022-06-20 07:19:38 +00:00
|
|
|
exec "nim -d:secure c -r " & nimFlags & " --opt:speed -d:debug -d:chronicles_log_level=INFO ./tests/testwebsockets.nim"
|
2021-06-01 02:39:14 +00:00
|
|
|
rmFile "./tests/testwebsockets"
|
2021-06-14 23:20:28 +00:00
|
|
|
|
2022-06-20 07:19:38 +00:00
|
|
|
exec "nim -d:accepts c -r " & nimFlags & " --opt:speed -d:debug -d:chronicles_log_level=INFO ./tests/testwebsockets.nim"
|
2021-06-14 23:20:28 +00:00
|
|
|
rmFile "./tests/testwebsockets"
|
|
|
|
|
2022-06-20 07:19:38 +00:00
|
|
|
exec "nim -d:secure -d:accepts c -r " & nimFlags & " --opt:speed -d:debug -d:chronicles_log_level=INFO ./tests/testwebsockets.nim"
|
2021-06-14 23:20:28 +00:00
|
|
|
rmFile "./tests/testwebsockets"
|