Style check fixes (#5)

* Style check fixes
* ngtcp2.nim generation
* fix ci
This commit is contained in:
Tanguy 2022-08-26 12:03:55 +02:00 committed by GitHub
parent fe5e54ee6c
commit 76bf92475f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2148 additions and 2099 deletions

View File

@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- uses: iffy/install-nim@v1.1
- uses: iffy/install-nim@v3
- name: Build
run: nimble install -y
- name: Test

View File

@ -27,7 +27,9 @@ toast \
--preprocess \
--noHeader \
--defines=NGTCP2_STATICLIB \
--replace=sockaddr=SockAddr,sockaddr_storage=Sockaddr_storage \
--replace=sockaddr=SockAddr,SockAddr_storage=Sockaddr_storage \
--includeDirs="${root}/sources/lib/includes" \
--includeDirs="${root}/build/lib/includes" \
"${root}/sources/lib/includes/ngtcp2/ngtcp2.h" >> "${root}/ngtcp2.nim"
sed -i 's/\bpassC\b/passc/g' ngtcp2.nim

5
config.nims Normal file
View File

@ -0,0 +1,5 @@
--styleCheck:usages
if (NimMajor, NimMinor) < (1, 6):
--styleCheck:hint
else:
--styleCheck:error

4230
ngtcp2.nim

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
packageName = "ngtcp2"
version = "0.32.0"
version = "0.33.0"
author = "Status Research & Development GmbH"
description = "Nim wrapper around the ngtcp2 library"
license = "MIT"

View File

@ -5,11 +5,11 @@ import strformat
import nativesockets
when defined(windows):
{.passL: "-lws2_32".}
{.passl: "-lws2_32".}
# C include directories
const root = currentSourcePath.parentDir
const sourceInclude = root/"sources"/"lib"/"includes"
const buildInclude = root/"build"/"lib"/"includes"
{.passC: fmt"-I{sourceInclude} -I{buildInclude}".}
{.passc: fmt"-I{sourceInclude} -I{buildInclude}".}