Skip to content

Commit 5ac2c99

Browse files
authored
chore: use cargo binstall to install zigbuild and xwin (#100)
* use cargo binstall to install zigbuild and xwin * chore: -y for installing the package * conditionally install binstall * chore: update auto generated files
1 parent 99962ec commit 5ac2c99

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/release-node-bindings.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,19 @@ jobs:
7272
uses: goto-bus-stop/setup-zig@v2
7373
with:
7474
version: 0.13.0
75+
76+
# Binstall is only needed for install cross-compilation
77+
# tools on linux
78+
- name: Install Binstall (Linux only)
79+
if: runner.os == 'Linux'
80+
uses: cargo-bins/cargo-binstall@main
81+
7582
- name: Install cargo-zigbuild (Linux only)
7683
if: runner.os == 'Linux'
77-
run: cargo install cargo-zigbuild
84+
run: cargo binstall cargo-zigbuild -y
7885
- name: Install cargo-xwin (Windows on Linux only)
7986
if: runner.os == 'Linux' && contains(matrix.settings.target, 'windows')
80-
run: cargo install cargo-xwin
87+
run: cargo binstall cargo-xwin -y
8188
- name: Build (macOS)
8289
if: runner.os == 'macOS'
8390
run: |

bindings/node/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export class CellsAndProofs {
1313
cells: Array<Uint8Array>
1414
proofs: Array<Uint8Array>
1515
}
16-
export type PeerDASContextJs = PeerDasContextJs
17-
export class PeerDasContextJs {
16+
export type DASContextJs = DasContextJs
17+
export class DasContextJs {
1818
constructor()
1919
blobToKzgCommitment(blob: Uint8Array): Uint8Array
2020
asyncBlobToKzgCommitment(blob: Uint8Array): Promise<Uint8Array>

bindings/node/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ if (!nativeBinding) {
310310
throw new Error(`Failed to load native binding`)
311311
}
312312

313-
const { BYTES_PER_COMMITMENT, BYTES_PER_PROOF, BYTES_PER_FIELD_ELEMENT, BYTES_PER_BLOB, MAX_NUM_COLUMNS, BYTES_PER_CELL, CellsAndProofs, PeerDasContextJs } = nativeBinding
313+
const { BYTES_PER_COMMITMENT, BYTES_PER_PROOF, BYTES_PER_FIELD_ELEMENT, BYTES_PER_BLOB, MAX_NUM_COLUMNS, BYTES_PER_CELL, CellsAndProofs, DasContextJs } = nativeBinding
314314

315315
module.exports.BYTES_PER_COMMITMENT = BYTES_PER_COMMITMENT
316316
module.exports.BYTES_PER_PROOF = BYTES_PER_PROOF
@@ -319,4 +319,4 @@ module.exports.BYTES_PER_BLOB = BYTES_PER_BLOB
319319
module.exports.MAX_NUM_COLUMNS = MAX_NUM_COLUMNS
320320
module.exports.BYTES_PER_CELL = BYTES_PER_CELL
321321
module.exports.CellsAndProofs = CellsAndProofs
322-
module.exports.PeerDasContextJs = PeerDasContextJs
322+
module.exports.DasContextJs = DasContextJs

0 commit comments

Comments
 (0)