File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,24 +46,29 @@ jobs:
4646 override : true
4747
4848 - name : Compile Production Binaries
49- run : cargo build --release --workspace --target ${{ matrix.target }}
49+ run : |
50+ cargo build --release --workspace --target ${{ matrix.target }}
51+ cd node-module && npm install && npm run build
5052
5153 - name : Stage Assets for Upload
5254 shell : bash
5355 run : |
5456 mkdir staging
5557 # Define binaries
56- CLI_BIN="gpupatch-cli "
57- GUI_BIN="gpupatch-gui "
58+ CLI_BIN="gpupatch"
59+ GUI_BIN="companion "
5860 EXT=""
5961 if [ "${{ matrix.os }}" = "windows-latest" ]; then
6062 EXT=".exe"
6163 fi
62-
64+
6365 # Copy binaries
6466 cp target/${{ matrix.target }}/release/${CLI_BIN}${EXT} ./staging/${CLI_BIN}-${{ matrix.target }}${EXT}
6567 cp target/${{ matrix.target }}/release/${GUI_BIN}${EXT} ./staging/${GUI_BIN}-${{ matrix.target }}${EXT}
66-
68+
69+ # Copy Node module
70+ cp node-module/*.node ./staging/gpupatch-node-${{ matrix.target }}.node
71+
6772 if [ "${{ matrix.os }}" != "windows-latest" ]; then
6873 chmod +x ./staging/*
6974 fi
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ resolver = "2"
33members = [
44 " core" ,
55 " cli" ,
6- " gui" ,
6+ " gui" , " node-module " ,
77]
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " gpupatch-node"
3+ version = " 0.1.0"
4+ edition = " 2024"
5+
6+ [lib ]
7+ crate-type = [" cdylib" ]
8+
9+ [dependencies ]
10+ napi = { version = " 2.16.0" , features = [" napi4" ] }
11+ napi-derive = " 2.16.0"
12+ gpupatch-core = { path = " ../core" }
13+
14+ [build-dependencies ]
15+ napi-build = " 2.1.0"
Original file line number Diff line number Diff line change 1+ fn main ( ) {
2+ napi_build:: setup ( ) ;
3+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " gpupatch-node" ,
3+ "version" : " 0.1.0" ,
4+ "main" : " index.js" ,
5+ "types" : " index.d.ts" ,
6+ "devDependencies" : {
7+ "@napi-rs/cli" : " ^3.0.0"
8+ },
9+ "scripts" : {
10+ "build" : " napi build --platform --release"
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ #[ macro_use]
2+ extern crate napi_derive;
3+
4+ use napi:: bindgen_prelude:: * ;
5+
6+ #[ napi]
7+ pub fn hello_from_gpupatch ( ) -> String {
8+ "Hello from GPUPatch core!" . to_owned ( )
9+ }
You can’t perform that action at this time.
0 commit comments