Skip to content

Commit

Permalink
Add multi-arch binaries for Windows/macOS/Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisameling committed May 2, 2021
1 parent 7ecf70b commit 5f28c4b
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dist/zkgroup/internal/Native.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added libzkgroup-arm64.dll
Binary file not shown.
Binary file added libzkgroup-arm64.dylib
Binary file not shown.
Binary file added libzkgroup-arm64.so
Binary file not shown.
Binary file added libzkgroup-ia32.dll
Binary file not shown.
Binary file added libzkgroup-ia32.so
Binary file not shown.
Binary file added libzkgroup-x64.dll
Binary file not shown.
Binary file added libzkgroup-x64.dylib
Binary file not shown.
Binary file added libzkgroup-x64.so
Binary file not shown.
Binary file removed libzkgroup.dll
Binary file not shown.
Binary file removed libzkgroup.dylib
Binary file not shown.
Binary file removed libzkgroup.so
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"dist/zkgroup",
"dist/index.d.ts",
"zkgroup/modules",
"libzkgroup.dylib",
"libzkgroup.dll",
"libzkgroup.so"
"libzkgroup-*.dylib",
"libzkgroup-*.dll",
"libzkgroup-*.so"
],
"scripts": {
"build": "tsc",
Expand Down
3 changes: 2 additions & 1 deletion zkgroup/internal/Native.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { join, resolve } from 'path';
import { Library } from 'ffi-napi';
import FFICompatArray, { FFICompatArrayType } from './FFICompatArray';
import * as process from 'process';

type IntType = number;
type UInt32Type = number;
Expand All @@ -15,7 +16,7 @@ export const RANDOM_LENGTH = 32;
const rootPath = resolve(`${__dirname}/../../../`);

// We need to do things differently if we are in an app.asar, common in the Electron world
const libraryPath = join(rootPath.replace('app.asar', 'app.asar.unpacked'), 'libzkgroup');
const libraryPath = join(rootPath.replace('app.asar', 'app.asar.unpacked'), 'libzkgroup-' + process.arch);


interface NativeCalls {
Expand Down

0 comments on commit 5f28c4b

Please sign in to comment.