Skip to content

Commit 48717f5

Browse files
committed
feat: support quickjs arm64
1 parent 0cc505a commit 48717f5

File tree

3 files changed

+38
-36
lines changed

3 files changed

+38
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ installing engines to make eshost automatically find the installed engines.
4242
| [Hermes][] | `hermes` || | | | | ||
4343
| [LibJS][] | `serenity-js` ||| || | | |
4444
| [JavaScriptCore][] | `jsc`, `javascriptcore` ||| || | ||
45-
| [QuickJS][] | `quickjs`, `quickjs-run-test262` || ||| |||
45+
| [QuickJS][] | `quickjs`, `quickjs-run-test262` || ||| |||
4646
| [SpiderMonkey][] | `sm`, `spidermonkey` ||||| |||
4747
| [V8][] | `v8` ||||| |||
4848
| [XS][] | `xs` || ||| | ||

package-lock.json

Lines changed: 30 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/engines/quickjs.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ function getFilename() {
1616
return 'win-i686';
1717
case 'win32-x64':
1818
return 'win-x86_64';
19+
case 'linux-arm64':
20+
return 'linux-aarch64';
1921
default:
2022
throw new Error(`No QuickJS builds available for ${platform}`);
2123
}
@@ -39,7 +41,10 @@ class QuickJSInstaller extends Installer {
3941

4042
getDownloadURL(version) {
4143
if (platform === 'darwin-x64') {
42-
return 'https://github.com/napi-bindings/quickjs-build/releases/download/5.2.0/qjs-macOS.zip';
44+
return 'https://github.com/napi-bindings/quickjs-build/releases/download/5.3.0/qjs-macOS.zip';
45+
}
46+
if (platform === 'linux-arm64') {
47+
return 'https://github.com/napi-bindings/quickjs-build/releases/download/5.3.0/qjs-linux-arm64.zip';
4348
}
4449
return `https://bellard.org/quickjs/binary_releases/quickjs-${getFilename()}-${version}.zip`;
4550
}
@@ -49,7 +54,7 @@ class QuickJSInstaller extends Installer {
4954
}
5055

5156
async install() {
52-
if (platform === 'darwin-x64') {
57+
if (platform === 'darwin-x64' || platform === 'linux-arm64') {
5358
this.binPath = await this.registerBinary('quickjs');
5459
await this.registerBinary('run-test262', 'quickjs-run-test262');
5560
} else if (platform.startsWith('win')) {

0 commit comments

Comments
 (0)