2021-07-15 08:25:25 +02:00
|
|
|
menu "Lua configuration"
|
|
|
|
|
2021-08-21 17:39:54 +02:00
|
|
|
choice LUA_VERSION
|
|
|
|
prompt "Lua version"
|
|
|
|
default LUA_VERSION_51
|
|
|
|
help
|
|
|
|
The version of Lua interpreter to use.
|
|
|
|
|
|
|
|
config LUA_VERSION_51
|
|
|
|
bool "Lua 5.1"
|
|
|
|
|
|
|
|
config LUA_VERSION_53
|
|
|
|
bool "Lua 5.3"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2021-07-15 08:25:25 +02:00
|
|
|
config LUA_NUMBER_INTEGRAL
|
2021-08-21 17:39:54 +02:00
|
|
|
depends on LUA_VERSION_51
|
2021-07-15 08:25:25 +02:00
|
|
|
bool "Integer-only build"
|
|
|
|
default "n"
|
|
|
|
help
|
|
|
|
Build Lua without support for floating point numbers.
|
|
|
|
Not generally recommended, but can save on code size.
|
|
|
|
|
2021-08-21 17:39:54 +02:00
|
|
|
config LUA_NUMBER_INT64
|
|
|
|
depends on LUA_VERSION_53
|
|
|
|
bool "Use 64bit integers"
|
|
|
|
default "n"
|
|
|
|
help
|
|
|
|
Build Lua with 64bit integers. This provides a greater value
|
|
|
|
range, but at the expense of extra memory usage and somewhat
|
|
|
|
reduced performance over the default 32bit integers.
|
|
|
|
|
|
|
|
config LUA_NUMBER_DOUBLE
|
|
|
|
depends on LUA_VERSION_53
|
|
|
|
bool "Use double precision floating point"
|
|
|
|
default "n"
|
|
|
|
help
|
|
|
|
Build Lua with double floating point precision. This provides
|
|
|
|
a greater value range, but at the expense of extra memory
|
|
|
|
usage and somewhat reduced performance over the default
|
|
|
|
single precision floating point.
|
|
|
|
|
2021-07-15 08:25:25 +02:00
|
|
|
menu "Core Lua modules"
|
|
|
|
|
|
|
|
config LUA_BUILTIN_STRING
|
|
|
|
bool "String module"
|
|
|
|
default "y"
|
|
|
|
help
|
|
|
|
Includes the string module (recommended).
|
|
|
|
|
|
|
|
config LUA_BUILTIN_TABLE
|
|
|
|
bool "Table module"
|
|
|
|
default "y"
|
|
|
|
help
|
|
|
|
Includes the table module (recommended).
|
|
|
|
|
|
|
|
config LUA_BUILTIN_COROUTINE
|
|
|
|
bool "Coroutine module"
|
|
|
|
default "y"
|
|
|
|
help
|
|
|
|
Includes the coroutine module (recommended).
|
|
|
|
|
2021-10-20 12:24:09 +02:00
|
|
|
config LUA_BUILTIN_IO
|
|
|
|
bool "I/O module"
|
|
|
|
default "y"
|
|
|
|
help
|
|
|
|
Includes the file I/O module (recommended).
|
|
|
|
|
2021-07-15 08:25:25 +02:00
|
|
|
config LUA_BUILTIN_MATH
|
|
|
|
bool "Math module"
|
|
|
|
default "y"
|
|
|
|
help
|
|
|
|
Includes the math module (recommended).
|
|
|
|
|
2021-08-21 17:39:54 +02:00
|
|
|
config LUA_BUILTIN_UTF8
|
|
|
|
depends on !LUA_VERSION_51
|
|
|
|
bool "UTF8 module"
|
|
|
|
default "y"
|
|
|
|
help
|
2021-08-23 15:32:13 +02:00
|
|
|
Includes the debug module (required by our Lua VM).
|
2021-08-21 17:39:54 +02:00
|
|
|
|
2021-07-15 08:25:25 +02:00
|
|
|
config LUA_BUILTIN_DEBUG
|
|
|
|
bool "Debug module"
|
|
|
|
default "n"
|
|
|
|
help
|
|
|
|
Includes the debug module.
|
|
|
|
|
|
|
|
config LUA_BUILTIN_DEBUG_EXTENDED
|
|
|
|
depends on LUA_BUILTIN_DEBUG
|
|
|
|
bool "Extended debug support"
|
|
|
|
default "n"
|
|
|
|
help
|
|
|
|
Includes the full debug module, rather than just getregistry
|
|
|
|
and traceback.
|
|
|
|
|
|
|
|
config LUA_BUILTIN_DEBUG_MINIMAL
|
|
|
|
depends on LUA_BUILTIN_DEBUG
|
|
|
|
bool
|
|
|
|
default !LUA_BUILTIN_DEBUG_EXTENDED
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
menu "Lua compilation"
|
|
|
|
|
|
|
|
choice LUA_OPTIMIZE_DEBUG_LEVEL
|
|
|
|
prompt "Discard debug info in compiled Lua"
|
|
|
|
default LUA_OPTIMIZE_DEBUG_NONE
|
|
|
|
help
|
|
|
|
Discard debug information in compiled Lua code to save memory.
|
|
|
|
|
|
|
|
config LUA_OPTIMIZE_DEBUG_NONE
|
|
|
|
bool "No (keep full debug info)"
|
|
|
|
config LUA_OPTIMIZE_DEBUG_LOCAL_UPVAL
|
|
|
|
bool "Some (discard local & upvalue debug info)"
|
|
|
|
config LUA_OPTIMIZE_DEBUG_LOCAL_UPVAL_LINENO
|
|
|
|
bool "All (discard local, upvalue & line number info)"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config LUA_OPTIMIZE_DEBUG
|
|
|
|
int
|
|
|
|
default 1 if LUA_OPTIMIZE_DEBUG_NONE
|
|
|
|
default 2 if LUA_OPTIMIZE_DEBUG_LOCAL_UPVAL
|
|
|
|
default 3 if LUA_OPTIMIZE_DEBUG_LOCAL_UPVAL_LINENO
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
2021-08-21 17:39:54 +02:00
|
|
|
config LUA_REQUIRED_MODULES
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
select NODEMCU_CMODULE_PIPE
|
|
|
|
select NODEMCU_CMODULE_UART
|
2021-08-23 15:32:13 +02:00
|
|
|
select LUA_BUILTIN_DEBUG
|
2021-08-21 17:39:54 +02:00
|
|
|
|
2022-10-17 23:39:56 +02:00
|
|
|
choice LUA_INIT_STRING
|
|
|
|
prompt "Boot command"
|
|
|
|
default LUA_INIT_STRING_INIT_LUA
|
|
|
|
help
|
|
|
|
Command to run on boot. This can be a .lua file, an LFS module, or
|
|
|
|
any valid Lua expression. By default init.lua is loaded and run
|
|
|
|
from the SPIFFS filesystem.
|
|
|
|
config LUA_INIT_STRING_INIT_LUA
|
|
|
|
bool "init.lua from SPIFFS"
|
|
|
|
config LUA_INIT_STRING_INIT_LFS
|
|
|
|
bool "init module from LFS"
|
|
|
|
config LUA_INIT_STRING_CUSTOM
|
|
|
|
bool "Custom"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config LUA_INIT_STRING_CUSTOM_STRING
|
|
|
|
string "Custom boot command" if LUA_INIT_STRING_CUSTOM
|
|
|
|
default ""
|
|
|
|
help
|
|
|
|
Run a custom command on boot.
|
|
|
|
|
|
|
|
Specify @filename.lua to load "filename.lua" from SPIFFS.
|
|
|
|
Specify node.LFS.get('foo')() to load the module "foo" from LFS.
|
|
|
|
Or specify any other valid Lua expression to execute that on boot.
|
|
|
|
|
|
|
|
config LUA_INIT_STRING
|
|
|
|
string
|
|
|
|
default "@init.lua" if LUA_INIT_STRING_INIT_LUA
|
|
|
|
default "node.LFS.get('init')()" if LUA_INIT_STRING_INIT_LFS
|
|
|
|
default LUA_INIT_STRING_CUSTOM_STRING if LUA_INIT_STRING_CUSTOM
|
|
|
|
|
2021-07-15 08:25:25 +02:00
|
|
|
endmenu
|