Skip to content

Commit 34ae623

Browse files
coltfredleeroy-traviscjyar
authored
Add node 18 to release (#107)
* Add node 18 to release * Add 18 to ci, too. Also, nix * Add 18 to arm list * Run the patch * Update workflows from templates. * Try prepending ~/bin instead of appending. * Update workflows from templates. * Explicitly use tools from $HOME/bin. * Update workflows from templates. * Remove 12, and rust 1.56 * Update workflows from templates. * Update readme * Fix benchmarks and flake.nix * Fix link to neon * Add toolchain * Fix toolchain and readme Co-authored-by: Leeroy Travis <[email protected]> Co-authored-by: Chris Jones <[email protected]>
1 parent 3847c76 commit 34ae623

20 files changed

+170
-34
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/typescript-ci-patch.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,47 @@
22
- op: replace
33
path: /jobs/test/strategy/matrix
44
value:
5-
rust_version:
6-
- 1.56.0
5+
rust_version:
76
- stable
87
- beta
98
node_version:
10-
- 12
119
- 14
1210
- 16
11+
- 18
1312
system:
1413
- os: macos-12
1514
target: x86_64-apple-darwin
1615
- os: ubuntu-22.04
1716
target: x86_64-unknown-linux-gnu
1817
- os: windows-2019
1918
target: x86_64-pc-windows-msvc
20-
arch:
19+
arch:
2120
- x64
2221
include:
2322
# only node 15+ supports arm64 natively, so we only need to build 16 for now
2423
- system:
2524
os: [self-hosted, macOS, ARM64]
2625
target: aarch64-apple-darwin
2726
node_version: 16
28-
rust_version: 1.56.0
27+
rust_version: stable
2928
arch: arm64
3029
- system:
3130
os: [self-hosted, macOS, ARM64]
3231
target: aarch64-apple-darwin
3332
node_version: 16
33+
rust_version: beta
34+
arch: arm64
35+
#Node 18
36+
- system:
37+
os: [self-hosted, macOS, ARM64]
38+
target: aarch64-apple-darwin
39+
node_version: 18
3440
rust_version: stable
3541
arch: arm64
3642
- system:
3743
os: [self-hosted, macOS, ARM64]
3844
target: aarch64-apple-darwin
39-
node_version: 16
45+
node_version: 18
4046
rust_version: beta
4147
arch: arm64
4248
- op: add

.github/workflows/publish.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
node_version:
24-
- 12
2524
- 14
2625
- 16
26+
- 18
2727
system:
2828
- os: macos-12
2929
target: x86_64-apple-darwin
@@ -37,6 +37,10 @@ jobs:
3737
os: [self-hosted, macOS, ARM64]
3838
target: aarch64-apple-darwin
3939
node_version: 16
40+
- system:
41+
os: [self-hosted, macOS, ARM64]
42+
target: aarch64-apple-darwin
43+
node_version: 18
4044
steps:
4145
- uses: actions/checkout@v2
4246
with:
@@ -78,9 +82,9 @@ jobs:
7882
fail-fast: false
7983
matrix:
8084
node_version:
81-
- '12'
8285
- '14'
8386
- '16'
87+
- '18'
8488
steps:
8589
- run: apk add build-base git python3 wget github-cli
8690
- uses: actions/checkout@v2

.github/workflows/typescript-ci.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ jobs:
1515
strategy:
1616
matrix:
1717
rust_version:
18-
- 1.56.0
1918
- stable
2019
- beta
2120
node_version:
22-
- 12
2321
- 14
2422
- 16
23+
- 18
2524
system:
2625
- os: macos-12
2726
target: x86_64-apple-darwin
@@ -39,7 +38,7 @@ jobs:
3938
- ARM64
4039
target: aarch64-apple-darwin
4140
node_version: 16
42-
rust_version: 1.56.0
41+
rust_version: stable
4342
arch: arm64
4443
- system:
4544
os:
@@ -48,6 +47,15 @@ jobs:
4847
- ARM64
4948
target: aarch64-apple-darwin
5049
node_version: 16
50+
rust_version: beta
51+
arch: arm64
52+
- system:
53+
os:
54+
- self-hosted
55+
- macOS
56+
- ARM64
57+
target: aarch64-apple-darwin
58+
node_version: 18
5159
rust_version: stable
5260
arch: arm64
5361
- system:
@@ -56,7 +64,7 @@ jobs:
5664
- macOS
5765
- ARM64
5866
target: aarch64-apple-darwin
59-
node_version: 16
67+
node_version: 18
6068
rust_version: beta
6169
arch: arm64
6270
fail-fast: false
@@ -91,13 +99,12 @@ jobs:
9199
strategy:
92100
matrix:
93101
rust_version:
94-
- 1.56.0
95102
- stable
96103
- beta
97104
node_version:
98-
- 12
99105
- 14
100106
- 16
107+
- 18
101108
arch:
102109
- x64
103110
os:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ artifacts.json
99
dist/*
1010
bin-package/*
1111
build/*
12-
.idea/*
12+
.idea/*
13+
.direnv

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This library uses the [Neon Bindings](https://www.neon-bindings.com) toolchain t
99

1010
## Supported Platforms
1111

12-
| | Node 12 | Node 14 | Node 16 |
12+
| | Node 14 | Node 16 | Node 18 |
1313
| --------------------- | ------- | ------- | ------- |
1414
| Linux x64 - glibc ||||
1515
| Linux x64 - musl-libc ||||
@@ -96,7 +96,7 @@ assert.equal(decryptedValue, plaintext);
9696

9797
## Local Development
9898

99-
In order to build the binary Node file for Recrypt, you'll need the dependencies specified on the [Neon Bindings site](https://guides.neon-bindings.com/getting-started/). Follow their getting started directions and install Rust and the Node Build Tools. The Neon CLI is already installed as a dependency of this project so you don't have to install that as a global dependency.
99+
In order to build the binary Node file for Recrypt, you'll need the dependencies specified on the [Neon Bindings site](https://neon-bindings.com/docs/quick-start/). Follow their getting started directions and install Rust and the Node Build Tools. The Neon CLI is already installed as a dependency of this project so you don't have to install that as a global dependency.
100100

101101
Once all of those dependencies are installed, the following can be run.
102102

@@ -110,22 +110,22 @@ or
110110
yarn compile
111111
```
112112

113-
This will produce an `index.node` file within the `native` directory. This file can then be included within a NodeJS file by simply requiring the file, e.g.
113+
This will produce an `index.node` file within the `bin-package` directory. This file can be used directly, or via index.js:
114114

115115
```
116-
const recrypt = require('index.node');
116+
const recrypt = require('index.js');
117117
```
118118

119119
### Benchmarks
120120

121121
- From this repos root, run `npm i` or `yarn`.
122-
- Run `npm/yarn run compile` to compile the Rust source into a `native/index.node` module.
122+
- Run `npm/yarn run compile` to compile the Rust source into a `bin-package/index.node` module.
123123
- Run `npm/yarn run benchmark`.
124124

125125
### Unit Tests
126126

127127
- From this repos root, run `npm i` or `yarn`.
128-
- Run `npm/yarn run compile` to compile the Rust source into a `native/index.node` module.
128+
- Run `npm/yarn run compile` to compile the Rust source into a `bin-package/index.node` module.
129129
- Run `npm/yarn run test`.
130130

131131
Copyright (c) 2021 IronCore Labs, Inc.

benchmark/computePublicKey.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Benchmark = require("benchmark");
2-
const recrypt = require("../index.node");
2+
const recrypt = require("../index.js");
33

44
const api = new recrypt.Api256();
55

benchmark/decryptLevelOne.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Benchmark = require("benchmark");
2-
const recrypt = require("../index.node");
2+
const recrypt = require("../index.js");
33
//Randomly generated legit ED25519 keypair
44
const privateSigningKey = Buffer.from("O7f2FYsabKOFj3enK+HQ+cBmTMbAG6aCesd1nLcFM1wtA9XHg0+rFIVA7+nomADjEbJ1R/Gd+xHBO79UnLqxDQ==", "base64");
55

benchmark/decryptLevelTwo.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const Benchmark = require("benchmark");
2-
const recrypt = require("../index.node");
3-
//Randomly generated legit ED25519 keypair
2+
const recrypt = require("../index.js");//Randomly generated legit ED25519 keypair
43
const privateSigningKey = Buffer.from("O7f2FYsabKOFj3enK+HQ+cBmTMbAG6aCesd1nLcFM1wtA9XHg0+rFIVA7+nomADjEbJ1R/Gd+xHBO79UnLqxDQ==", "base64");
54

65
const api = new recrypt.Api256();

benchmark/decryptLevelZero.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Benchmark = require("benchmark");
2-
const recrypt = require("../index.node");
2+
const recrypt = require("../index.js");
33
//Randomly generated legit ED25519 keypair
44
const privateSigningKey = Buffer.from("O7f2FYsabKOFj3enK+HQ+cBmTMbAG6aCesd1nLcFM1wtA9XHg0+rFIVA7+nomADjEbJ1R/Gd+xHBO79UnLqxDQ==", "base64");
55

0 commit comments

Comments
 (0)