6

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?

4

2 回答 2

9

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

于 2011-07-01T00:39:46.983 回答
0

具体来说:

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

我认为这几乎说明了一切。

于 2012-01-23T13:26:15.900 回答