Cargo Features

[dependencies]
lua-jit-sys = { version = "2.0.50", default-features = false, features = ["arch_arm", "arch_powerpc", "arch_powerpc_spe", "arch_x64", "arch_x86", "force_32_bit", "sse", "sse2", "extra_warnings", "enable_lua52_compat", "disable_jit", "nummode_1", "nummode_2", "use_sysmalloc", "use_valgrind", "use_gdb_jit", "use_apicheck", "use_assert", "optimize_size", "strip", "ps3", "cellos_lv2"] }
default = arch_x64

The arch_x64 feature is set by default whenever lua-jit-sys is added without default-features = false somewhere in the dependency tree.

arch_arm

PLEASE CHOOSE ONLY ONE OF THE ARCHITECTURES, WILL NOT COMPILE OTHERWISE!

arch_mips arch_mipsel arch_powerpc
arch_powerpc_spe
arch_x64 default
arch_x86
force_32_bit

Use this if you want to force a 32 bit build on a 64 bit multilib OS.

sse

Enable or disable SSE (for GCC)

sse2

Enable or disable SSE2 (for GCC), overrides SSE

extra_warnings

Extra warnings (from GCC)

enable_lua52_compat

Features from Lua 5.2 that are unlikely to break existing code are enabled by default. Some other features that *might* break some existing code (e.g. __pairs or os.execute() return values) can be enabled here.
Note: this does not provide full compatibility with Lua 5.2 at this time.

disable_jit

Disable the JIT compiler, i.e. turn LuaJIT into a pure interpreter.

nummode_1

Some architectures (e.g. PPC) can use either single-number (1) or dual-number (2) mode. Uncomment one of these lines to override the default mode. Please see LJ_ARCH_NUMMODE in lj_arch.h for details.
XCFLAGS+= -DLUAJIT_NUMMODE=1
XCFLAGS+= -DLUAJIT_NUMMODE=2

Note: nummode_2 overrides nummode_1

nummode_2
use_sysmalloc ps3?

Use the system provided memory allocator (realloc) instead of the bundled memory allocator. This is slower, but sometimes helpful for debugging. This option cannot be enabled on x64, since realloc usually doesn't return addresses in the right address range.
OTOH this option is mandatory for Valgrind's memcheck tool on x64 and the only way to get useful results from it for all other architectures.

use_valgrind

This define is required to run LuaJIT under Valgrind. The Valgrind header files must be installed. You should enable debug information, too.
Use --suppressions=lj.supp to avoid some false positives.

use_gdb_jit

This is the client for the GDB JIT API. GDB 7.0 or higher is required to make use of it. See lj_gdbjit.c for details. Enabling this causes a non-negligible overhead, even when not running under GDB.

use_apicheck

Turn on assertions for the Lua/C API to debug problems with lua_* calls.
This is rather slow -- use only while developing C libraries/embeddings.

use_assert

Turn on assertions for the whole LuaJIT VM. This significantly slows down everything. Use only if you suspect a problem with LuaJIT itself.

optimize_size

Optimize for size (-Os) in GCC

strip

Strip the final static library from symbols

ps3 = cellos_lv2, use_sysmalloc

PlayStation 3 config

cellos_lv2 ps3?

Misc, only for PS3