Skip to content

Commit fdfe6f8

Browse files
committed
1.0.0
1 parent 5603c89 commit fdfe6f8

File tree

3 files changed

+42
-53
lines changed

3 files changed

+42
-53
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: CI
22
env:
33
DEBUG: napi:*
4-
APP_NAME: influxdb3-napi
54
MACOSX_DEPLOYMENT_TARGET: '10.13'
65
CARGO_INCREMENTAL: '1'
6+
APP_NAME: influxdb3-napi
77
API_TOKEN: ${{ secrets.API_TOKEN }}
88
SERVER_URL: ${{ vars.SERVER_URL }}
99
'on':
@@ -28,27 +28,21 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v5
31-
3231
- name: Setup node
3332
uses: actions/setup-node@v4
3433
with:
3534
node-version: 22
36-
cache: 'yarn'
37-
35+
cache: yarn
3836
- name: Install
3937
uses: dtolnay/rust-toolchain@stable
4038
with:
4139
components: clippy, rustfmt
42-
4340
- name: Install dependencies
4441
run: yarn install
45-
4642
- name: Oxlint
4743
run: yarn lint
48-
4944
- name: Cargo fmt
5045
run: cargo fmt -- --check
51-
5246
- name: Clippy
5347
run: cargo clippy
5448
build:
@@ -79,10 +73,10 @@ jobs:
7973
setup: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
8074
build: yarn build --target aarch64-unknown-linux-gnu --use-napi-cross
8175
env:
82-
OPENSSL_VENDORED: "1"
83-
CC_aarch64_unknown_linux_gnu: "aarch64-linux-gnu-gcc"
84-
AR_aarch64_unknown_linux_gnu: "aarch64-linux-gnu-ar"
85-
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
76+
OPENSSL_VENDORED: '1'
77+
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
78+
AR_aarch64_unknown_linux_gnu: aarch64-linux-gnu-ar
79+
CFLAGS_aarch64_unknown_linux_gnu: '-D__ARM_ARCH=8'
8680
- host: ubuntu-latest
8781
target: armv7-unknown-linux-gnueabihf
8882
build: yarn build --target armv7-unknown-linux-gnueabihf --use-napi-cross
@@ -170,7 +164,7 @@ jobs:
170164
version: '14.2'
171165
memory: 8G
172166
cpu_count: 3
173-
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
167+
environment_variables: DEBUG RUSTUP_IO_THREADS
174168
shell: bash
175169
run: |
176170
sudo pkg install -y -f curl node libnghttp2 npm cmake
@@ -291,22 +285,6 @@ jobs:
291285
else
292286
echo "IMAGE=node:${{ matrix.node }}" >> $GITHUB_OUTPUT
293287
fi
294-
# node -e "
295-
# if ('${{ matrix.target }}'.startsWith('aarch64')) {
296-
# console.log('PLATFORM=linux/arm64')
297-
# } else if ('${{ matrix.target }}'.startsWith('armv7')) {
298-
# console.log('PLATFORM=linux/arm/v7')
299-
# } else {
300-
# console.log('PLATFORM=linux/amd64')
301-
# }
302-
# " >> $GITHUB_OUTPUT
303-
# node -e "
304-
# if ('${{ matrix.target }}'.endsWith('-musl')) {
305-
# console.log('IMAGE=node:${{ matrix.node }}-alpine')
306-
# } else {
307-
# console.log('IMAGE=node:${{ matrix.node }}-slim')
308-
# }
309-
# " >> $GITHUB_OUTPUT
310288
- name: Install dependencies
311289
run: |
312290
yarn config set --json supportedArchitectures.cpu '["current", "arm64", "x64", "arm"]'
@@ -329,7 +307,6 @@ jobs:
329307
node --version
330308
echo "=== Platform info ==="
331309
uname -a
332-
333310
- name: List packages
334311
run: ls -R .
335312
shell: bash
@@ -340,16 +317,15 @@ jobs:
340317
platforms: all
341318
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
342319
if: ${{ contains(matrix.target, 'armv7') }}
343-
344320
- name: Test bindings
345321
uses: addnab/docker-run-action@v3
346322
with:
347323
image: ${{ steps.docker.outputs.IMAGE }}
348-
options: -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }} -e API_TOKEN=${{ secrets.API_TOKEN }} -e SERVER_URL=${{ vars.SERVER_URL }}
324+
options: '-v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }} -e API_TOKEN=${{ secrets.API_TOKEN }} -e SERVER_URL=${{ vars.SERVER_URL }}'
349325
run: |
350326
echo "=== glibc version ==="
351327
ldd --version
352-
328+
353329
if [ "${{ steps.docker.outputs.IMAGE }}" = "ubuntu:24.04" ]; then
354330
echo "=== Installing Node.js ${{ matrix.node }} on Ubuntu 24.04 ==="
355331
apt-get update -qq
@@ -412,4 +388,4 @@ jobs:
412388
fi
413389
env:
414390
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
415-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
391+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Cargo.toml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ path = "src/bin/main.rs"
1515
[dependencies]
1616
serde_json = "1.0.141"
1717
tokio = "1.47.0"
18-
serde = { version = "1.0.219", features = ["derive"] }
18+
19+
[dependencies.serde]
20+
version = "1.0.219"
21+
features = ["derive"]
1922

2023
[dependencies.napi-derive]
2124
version = "3.2"
@@ -28,7 +31,7 @@ features = ["full","experimental","tokio","web_stream","tokio-stream"]
2831

2932
[dependencies.reqwest]
3033
version = "0.12"
31-
features = ["json", "__rustls", "gzip"]
34+
features = ["json","__rustls","gzip"]
3235

3336
[dependencies.tonic]
3437
version = "0.12.3"
@@ -52,30 +55,40 @@ napi-build = "2.2.3"
5255
[build-dependencies.napi-derive]
5356
version = "3.1.2"
5457

55-
[target.x86_64-unknown-linux-gnu.dependencies]
56-
openssl = { version = "0.10", features = ["vendored"] }
58+
[target.x86_64-unknown-linux-gnu.dependencies.openssl]
59+
version = "0.10"
60+
features = ["vendored"]
5761

58-
[target.aarch64-unknown-linux-gnu.dependencies]
59-
openssl = { version = "0.10", features = ["vendored"] }
62+
[target.aarch64-unknown-linux-gnu.dependencies.openssl]
63+
version = "0.10"
64+
features = ["vendored"]
6065

61-
[target.aarch64-linux-android.dependencies]
62-
openssl = { version = "0.10", features = ["vendored"] }
66+
[target.aarch64-linux-android.dependencies.openssl]
67+
version = "0.10"
68+
features = ["vendored"]
6369

64-
[target.armv7-linux-androideabi.dependencies]
65-
openssl = { version = "0.10", features = ["vendored"] }
70+
[target.armv7-linux-androideabi.dependencies.openssl]
71+
version = "0.10"
72+
features = ["vendored"]
6673

67-
[target.aarch64-unknown-linux-musl.dependencies]
68-
openssl = { version = "0.10", features = ["vendored"] }
74+
[target.aarch64-unknown-linux-musl.dependencies.openssl]
75+
version = "0.10"
76+
features = ["vendored"]
6977

70-
[target.x86_64-unknown-linux-musl.dependencies]
71-
openssl = { version = "0.10", features = ["vendored"] }
78+
[target.x86_64-unknown-linux-musl.dependencies.openssl]
79+
version = "0.10"
80+
features = ["vendored"]
7281

73-
[target.armv7-unknown-linux-gnueabihf.dependencies]
74-
openssl = { version = "0.10", features = ["vendored"] }
82+
[target.armv7-unknown-linux-gnueabihf.dependencies.openssl]
83+
version = "0.10"
84+
features = ["vendored"]
7585

7686
[dev-dependencies]
7787
dotenvy = "0.15"
78-
influxdb3_napi = { path = ".", features = ["native"] }
88+
89+
[dev-dependencies.influxdb3_napi]
90+
path = "."
91+
features = ["native"]
7992

8093
[features]
8194
default = []

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "influxdb3-napi",
2+
"name": "@badmachine/influxdb3-napi",
33
"version": "1.0.0",
44
"description": "Influxdb3 client written in rust and built for nodejs with napi-rs",
55
"main": "index.js",
@@ -116,4 +116,4 @@
116116
"arrowParens": "always"
117117
},
118118
"packageManager": "yarn@4.9.2"
119-
}
119+
}

0 commit comments

Comments
 (0)