• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

GoogleChromeLabs/jsvu: JavaScript (engine) Version Updater

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

GoogleChromeLabs/jsvu

开源软件地址:

https://github.com/GoogleChromeLabs/jsvu

开源编程语言:

JavaScript 100.0%

开源软件介绍:

jsvu Build status jsvu on npm

jsvu is the JavaScript (engine) Version Updater.

jsvu makes it easy to install recent versions of various JavaScript engines without having to compile them from source.

Installation

Note: jsvu requires Node.js v14+. (jsvu follows the latest active LTS version of Node.)

Install the jsvu CLI:

npm install jsvu -g

Modify your dotfiles (e.g. ~/.bashrc) to add ~/.jsvu to your PATH:

export PATH="${HOME}/.jsvu:${PATH}"

Then, run jsvu:

jsvu

On first run, jsvu prompts you for your operating system and architecture, and the list of JavaScript engines you wish to manage through jsvu. It then downloads and installs the latest version of each of the engines you selected.

To update the installed JavaScript engines later on, just run jsvu again.

Supported engines per OS

JavaScript engine Binary name mac64 mac64arm win32 win64 linux32 linux64
Chakra chakra or ch
GraalJS graaljs
Hermes hermes & hermes-repl
JavaScriptCore javascriptcore or jsc *
QuickJS quickjs
SpiderMonkey spidermonkey or sm
V8 v8
V8 debug v8-debug
XS xs (32) (32)

* JavaScriptCore requires external dependencies to run on Windows:

  • On 32-bit Windows, install iTunes.
  • On 64-bit Windows, download the latest WinCairoRequirements and add its bin64 directory to your PATH.

Integration with eshost-cli

eshost-cli makes it easy to run and compare code in all JavaScript engines that jsvu installs.

First, install eshost-cli:

npm install -g eshost-cli

Then, either automatically configure jsvu-installed hosts:

eshost --configure-jsvu

…or tell eshost-cli where jsvu installs each JavaScript engine following the instructions below.

Linux/Mac

eshost --add 'Chakra' ch ~/.jsvu/chakra
eshost --add 'GraalJS' graaljs ~/.jsvu/graaljs
eshost --add 'JavaScriptCore' jsc ~/.jsvu/javascriptcore
eshost --add 'QuickJS' qjs ~/.jsvu/quickjs
eshost --add 'SpiderMonkey' jsshell ~/.jsvu/spidermonkey
eshost --add 'V8 --harmony' d8 ~/.jsvu/v8 --args '--harmony'
eshost --add 'V8' d8 ~/.jsvu/v8
eshost --add 'XS' xs ~/.jsvu/xs

Windows

eshost --add "Chakra" ch "%USERPROFILE%\.jsvu\chakra.cmd"
eshost --add "GraalJS" graaljs "%USERPROFILE%\.jsvu\graaljs.cmd"
eshost --add "JavaScriptCore" jsc "%USERPROFILE%\.jsvu\javascriptcore.cmd"
eshost --add "SpiderMonkey" jsshell "%USERPROFILE%\.jsvu\spidermonkey.cmd"
eshost --add "V8 --harmony" d8 "%USERPROFILE%\.jsvu\v8.cmd" --args "--harmony"
eshost --add "V8" d8 "%USERPROFILE%\.jsvu\v8.cmd"
eshost --add "XS" xs "%USERPROFILE%\.jsvu\xs.cmd"

That’s it! You can now run code snippets in all those engines with a single command:

eshost -e 'new RegExp("\n").toString()' # https://crbug.com/v8/1982

eshost -e '(function maxCallStackSize() { try { return 1 + maxCallStackSize(); } catch (_) { return 1; }}())'

eshost -e 'Date.parse("1 Octopus 2018")'

Integration with non-interactive environments

On your personal devices, the only command you’ll ever need is jsvu as described above. There are no command-line flags to remember.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap