LuaJIT 和 Rocks?

发布于 2024-11-17 17:20:42 字数 323 浏览 8 评论 0原文

只是“Lua 新手”的一个小问题...我一直在使用 LuaJIT,它非常棒,问题是既然 LuaJIT 与 Lua 5.1 兼容,这是否意味着我可以使用标准 Lua 在 LuaJIT 中使用的所有“LuaRocks” ?

例如,如果我想安装 SQLite 库之一(例如 http://luaforge.net/projects/luasqlite/ ) - 我如何在 LuaJIT 中安装它?

所有可用的“LuaRocks”都可以与 LuaJIT 配合使用吗?

Just a small question from a "Lua newbie"...I have been using LuaJIT and it is awesome, no the question is since LuaJIT is Lua 5.1 compatible does that mean I can use all the "LuaRocks" that standard Lua uses in LuaJIT?

For instance if I wanted to install one of the SQLite libraries (e.g. http://luaforge.net/projects/luasqlite/) - how would I install that in LuaJIT?

Do all the available "LuaRocks" work out the box with LuaJIT?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

空城旧梦 2024-11-24 17:20:42

LuaJIT设计是为了与独立的 Lua 直接兼容。任何纯粹基于 Lua 的 Rock 都没有理由不能工作。基于 DLL 的 Rocks 应该也可以工作,因为 LuaJIT 独立 DLL 与原始 DLL 兼容。

LuaJIT is designed to be drop-in compatible with the Lua stand-alone. There is no reason why any purely Lua-based Rocks shouldn't work. DLL-based Rocks ought to work as well, since the LuaJIT stand-alone DLL is compatible with the original DLL.

夜声 2024-11-24 17:20:42

具体来说:

“LuaJIT完全向上兼容Lua 5.1。它支持所有标准Lua库函数和全套Lua/C API
功能。 LuaJIT 还与 Lua 5.1 完全 ABI 兼容。
链接器/动态加载器级别。这意味着你可以编译一个C模块
对照标准 Lua 头文件并加载相同的共享库
Lua 或 LuaJIT。”

我认为这已经说明了一切。

Concretely:

"LuaJIT is fully upwards-compatible with Lua 5.1. It supports all standard Lua library functions and the full set of Lua/C API
functions. LuaJIT is also fully ABI-compatible to Lua 5.1 at the
linker/dynamic loader level. This means you can compile a C module
against the standard Lua headers and load the same shared library from
either Lua or LuaJIT."

I think that pretty much says it all.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文