Commit b193f6c 1 parent 54acc16 commit b193f6c Copy full SHA for b193f6c
File tree 5 files changed +38
-3
lines changed
5 files changed +38
-3
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Determine the script's directory and the project root directory
4
+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
5
+ PROJECT_ROOT=" $( cd " $SCRIPT_DIR /../.." && pwd) "
6
+
7
+ cd $PROJECT_ROOT /bindings/node
8
+
9
+ mv $PROJECT_ROOT /.cargo/config.node.cross.toml $PROJECT_ROOT /.cargo/config.toml
10
+
11
+ npm install -g @napi-rs/cli
12
+
13
+ napi build --platform --release --target x86_64-unknown-linux-gnu
14
+ napi build --platform --release --target aarch64-unknown-linux-gnu
15
+ napi build --platform --release --target x86_64-pc-windows-msvc
16
+ napi build --platform --release --target x86_64-apple-darwin
17
+ napi build --platform --release --target aarch64-apple-darwin
18
+
19
+ mv $PROJECT_ROOT /.cargo/config.toml $PROJECT_ROOT /.cargo/config.node.cross.toml
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This assumes we are on mac, for the CI we will be running this in Mac
4
+ # linkers needed for cross compiling for linux and windows
5
+ brew install SergioBenitez/osxct/x86_64-unknown-linux-gnu
6
+ brew tap messense/homebrew-macos-cross-toolchains
7
+ brew install aarch64-unknown-linux-gnu
8
+ brew install mingw-w64
9
+
10
+ rustup target add x86_64-unknown-linux-gnu
11
+ rustup target add aarch64-unknown-linux-gnu
12
+ rustup target add x86_64-pc-windows-msvc
13
+ rustup target add x86_64-apple-darwin
14
+ rustup target add aarch64-apple-darwin
Original file line number Diff line number Diff line change @@ -5,12 +5,14 @@ package peerdas_kzg
5
5
#cgo darwin,arm64 LDFLAGS: ./build/aarch64-apple-darwin/libc_peerdas_kzg.a
6
6
#cgo linux,amd64 LDFLAGS: ./build/x86_64-unknown-linux-gnu/libc_peerdas_kzg.a
7
7
#cgo linux,arm64 LDFLAGS: ./build/aarch64-unknown-linux-gnu/libc_peerdas_kzg.a
8
- #cgo windows LDFLAGS: ./build/x86_64-pc-windows-gnu /libc_peerdas_kzg.a -lws2_32 -lntdll -luserenv
8
+ #cgo windows LDFLAGS: ./build/x86_64-pc-windows-msvc /libc_peerdas_kzg.a
9
9
#include "./build/c_peerdas_kzg.h"
10
10
*/
11
11
import "C"
12
12
import "runtime"
13
13
14
+ // #cgo windows LDFLAGS: ./build/x86_64-pc-windows-gnu/libc_peerdas_kzg.a -lws2_32 -lntdll -luserenv
15
+
14
16
type ProverContext struct {
15
17
_inner * C.ProverContext
16
18
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import os
3
3
const
4
4
buildDir = " build"
5
5
universalAppleDarwin = buildDir / " universal-apple-darwin"
6
- x86_64PcWindowsGnu = buildDir / " x86_64-pc-windows-gnu "
6
+ x86_64PcWindowsGnu = buildDir / " x86_64-pc-windows-msvc "
7
7
x86_64UnknownLinuxGnu = buildDir / " x86_64-unknown-linux-gnu"
8
8
aarch64UnknownLinuxGnu = buildDir / " aarch64-unknown-linux-gnu"
9
9
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ case "$OS" in
122
122
# Github runners will return MINGW64_NT-10.0-20348
123
123
# so we add a wildcard to match the prefix
124
124
MINGW64_NT-* |CYGWIN_NT-* |" Windows" )
125
- TARGET_NAME=" x86_64-pc-windows-gnu "
125
+ TARGET_NAME=" x86_64-pc-windows-msvc "
126
126
STATIC_LIB_NAME=" lib${LIB_NAME} .a"
127
127
DYNAMIC_LIB_NAME=" ${LIB_NAME} .dll"
128
128
;;
You can’t perform that action at this time.
0 commit comments