在 Linux 下运行 narwhal 的最佳方式

发布于 2024-09-14 06:34:14 字数 822 浏览 9 评论 0原文

我正在查看 narwhal。它看起来很酷,而且 tusk 包管理系统给我留下了特别深刻的印象。然而,由于 narwhal 在 rhino 下运行,因此该命令行工具的实用性会受到 JVM 令人讨厌的启动时间的影响。

我知道 narwhal 能够在不同的引擎下运行,但不清楚是否还有其他可用的选项,最好是无需大量配置工作即可工作的选项。

我尝试让 narwhal-v8 包运行,但是它似乎明确针对 OSX:它正在寻找 .dylib 文件形式的库。我破解了 makefile 以将其更改为 .so,并告诉它为我的 64 位架构构建 v8。这条路上的下一个绊脚石是 ubuntu 中明显神秘地缺少 iconv 库。我正在努力解决这个问题,但所有这些错误都表明可能存在“做错了”反模式,因此我认为明智的做法是求助于集体智慧。

linux下的narwhal是否可以使用比rhino更快的引擎?或者,我必须跳过什么样的环节才能让它在 nailgun 下运行

编辑:我已经让它在钉枪下工作了。运行几次后,运行 narwhal --help 的时间下降到大约 10%。我将尝试制作一个以便携式方式实现此功能的独角鲸引擎。

I'm checking out narwhal. It seems pretty cool, and I'm particularly impressed with the tusk package management system. However, since narwhal runs under rhino, the usefulness of this command-line tool is impinged upon by the JVM's obscene startup times.

I'm aware of narwhal's ability to run under different engines, but it's unclear whether there is another usable option, preferably one which will work without a significant amount of configuration effort.

I've tried to get the narwhal-v8 package going, but it seems to be explicitly targeted at OSX: it's looking for the library as a .dylib file. I hacked the makefile to change that for .so, and also told it to build v8 for my 64-bit architecture. The next stumbling block down that road is the apparent mysterious absence of an iconv library in ubuntu. I'm working on sorting that one out, but all of these errors indicate the possible presence of a Doing It Wrong anti-pattern, so I thought it prudent to appeal to the greater wisdom of the groupmind.

Is it possible to use a faster engine than rhino for narwhal under linux? Alternatively, what sorts of hoops would I have to jump through to get it running under nailgun?

edit: I've gotten it working under nailgun. After being run a couple of times, the time to run narwhal --help dropped to about 10%. I'm going to have a go at making a narwhal engine that implements this in a portable way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文