Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Escargot #147

Open
clover2123 opened this issue Oct 15, 2024 · 10 comments
Open

Add Escargot #147

clover2123 opened this issue Oct 15, 2024 · 10 comments

Comments

@clover2123
Copy link
Contributor

Hi all!

I would like to support our lightweight, cross-platform JavaScript engine Escargot for jsvu.
Currently, Escargot enables compatibility across multiple platforms - including Linux, macOS, and Windows - while maintaining full compliance with the most recent ECMAScript standard, specifically ECMAScript 2024.
Would it be possible for us to discuss further regarding this matter?

@mathiasbynens
Copy link
Member

Happy to review a patch :)

@clover2123
Copy link
Contributor Author

Could you provide me with some references to begin with or follow to assist in adding our JavaScript engine for jsvu?

@mathiasbynens
Copy link
Member

Look at the engines folder, pick an example, and use it as a starting point: https://github.com/GoogleChromeLabs/jsvu/tree/main/engines

@clover2123
Copy link
Contributor Author

@mathiasbynens
Would you please review my patch #150 ?

@mathiasbynens
Copy link
Member

Closed by #150. Thanks for the patch!

@mathiasbynens
Copy link
Member

This doesn’t work on macOS yet:

$ ./cli.js --engines=escargot
📦 jsvu v2.4.0 — the JavaScript engine Version Updater 📦
✔ Read OS from config: mac64arm
✔ Read engines from config: escargot
✔ Found latest Escargot version: v4.2.0.
✔ URL: https://github.com/Samsung/escargot/releases/download/v4.2.0/escargot-mac64arm
✔ Download completed.
❯ Extracting…
Installing binary to ~/.jsvu/engines/escargot/escargot…
Installing symlink at ~/.jsvu/bin/escargot pointing to ~/.jsvu/engines/escargot/escargot…
Installing wrapper script to ~/.jsvu/bin/escargot…
✔ Extraction completed.
❯ Testing…
✖ Error: Command failed with exit code 134 (Unknown system error -134): ~/.jsvu/bin/escargot /private/var/folders/4b/k028f6wj3gjdt155k431t8cm00fj2f/T/7ff754efc58f7cd0b1aac403eab70fde

Here’s the output when trying to run the binary directly:

$ ~/.jsvu/bin/escargot
dyld[95968]: Library not loaded: /opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib
  Referenced from: <DE20FEF1-53F4-3CF0-8976-F30090C4973F> ~/.jsvu/engines/escargot/escargot
  Reason: tried: '/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file), '/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file)
~/.jsvu/bin/escargot: line 2: 95968 Abort trap: 6           "~/.jsvu/engines/escargot/escargot" "$@"

It looks like you’ll need to bundle the required *.dylib files, and then install them like here:

installer.installLibraryGlob('*.dylib');

Currently the generated download URL points to an executable file. I’d suggest to publish ZIP files for each release containing not only the binary but also its dependencies, matching what other engine providers do.

@mathiasbynens mathiasbynens reopened this Nov 11, 2024
@mathiasbynens
Copy link
Member

Once all that is addressed, we’ll also need to update https://github.com/GoogleChromeLabs/jsvu#supported-engines-per-os to list Escargot.

mathiasbynens added a commit that referenced this issue Nov 19, 2024
This reverts commit 241e6b4.

Backing this out until the remaining TODOs in #147 (comment) have been addressed.
@mathiasbynens
Copy link
Member

I’ve backed out the initial PR in beff883. Please address the TODOs in #147 (comment) and send a new patch.

@clover2123
Copy link
Contributor Author

@mathiasbynens
Sure! thanks for the review. I'll update the patch soon :)

@clover2123
Copy link
Contributor Author

@mathiasbynens
I've uploaded #152 that also handles shared libraries.
Please review this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants