Skip to content

Commit

Permalink
Merge pull request #67 from nash-io/ts/add-arm-support
Browse files Browse the repository at this point in the history
Ts/add arm support
  • Loading branch information
localhuman authored Sep 18, 2023
2 parents 0b69072 + 7cddbb9 commit e2f3089
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [4.11.1](https://github.com/nash-io/nash-protocol/compare/v4.10.5...v4.11.1) (2023-09-18)

### [4.10.5](https://github.com/nash-io/nash-protocol/compare/v4.10.3...v4.10.5) (2023-05-22)

### [4.10.3](https://github.com/nash-io/nash-protocol/compare/v4.10.1...v4.10.3) (2023-05-22)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neon-exchange/nash-protocol",
"version": "4.10.5",
"version": "4.11.1",
"description": "TypeScript implementation of Nash crypto routines",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion src/native/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os from 'os'
import process from 'process'
import wasm from '../wasm'
interface NodeFileInterface {
dh_init: (size: number, curve: string) => string
Expand All @@ -10,7 +11,7 @@ interface NodeFileInterface {

const loadNodeFile = (): NodeFileInterface => {
const platform = os.platform()

const arch = process.arch
switch (platform) {
// case 'aix':
// case 'android':
Expand All @@ -22,6 +23,9 @@ const loadNodeFile = (): NodeFileInterface => {
case 'win32':
return require('./index_win.node')
case 'linux':
if (arch.startsWith('arm')) {
return require('./index_arm.node')
}
return require('./index_linux.node')
case 'darwin':
return require('./index_osx.node')
Expand Down
Binary file added src/native/index_arm.so
Binary file not shown.

0 comments on commit e2f3089

Please sign in to comment.