1 -- Compatibility layer for bitwise operations
3 -- First try the bit32 lib
4 -- Lua 5.3 has it with compat enabled
5 -- Lua 5.2 has it by default
9 -- Lua 5.1 may have it as a standalone module that can be installed
10 local ok
, bitop
= pcall(require
, "bit32")
17 -- Lua 5.3 and 5.4 would be able to use native infix operators
18 local ok
, bitop
= pcall(require
, "util.bit53")
25 -- Lastly, try the LuaJIT bitop library
26 local ok
, bitop
= pcall(require
, "bit")
32 error "No bit module found. See https://prosody.im/doc/depends#bitop";