The Lua programming language with some additional compile-time configuration options.
See lua.org for more infomation on the Lua language.
All additional options are controlled by preprocessor defines in
luaconf.h
.
Disable all floating point support in Lua. Only integers will be supported for
numeric operations. This removes any dependency on the standard C library's
<math.h>
. Setting this will also remove the following features, which require
floating point support:
- Floating point format specifiers for
string.format
(A
,a
,E
,e
,f
,G
, andg
). - Floating point format specifiers for
string.pack
,string.packsize
, andstring.unpack
(f
,d
, andn
). - Floating point literals (e.g
-3.5
or7e5
). - Floating point output of
collectgarbage("count")
. Instead of a fractional value in kilobytes this call will return the total number of bytes as an integer. - The
^
(power) operator. - The zero-parameter form of
math.random
. The function will always require one or two parameters. math.acos
math.asin
math.atan2
math.atan
math.ceil
math.cos
math.cosh
math.deg
math.exp
math.floor
math.fmod
math.frexp
math.huge
math.ldexp
math.log10
math.log
math.modf
math.pi
math.pow
math.rad
math.sin
math.sinh
math.sqrt
math.tan
math.tanh
Disable file system support in Lua. It is still possible to create io file
objects in C code and pass them to Lua scripts. The standard streams (stdin
,
stdout
, and stderr
) will continue to exist. Setting this will remove the
following features, which require file system support:
- The ability to pass a string containing a file name to be opened to
io.input
,io.lines
, orio.output
. dofile
io.open
io.tmpfile
loadfile
module
os.remove
os.rename
os.tmpname
package.config
package.cpath
package.loadlib
package.path
package.preload
package.searchers
package.searchpath
require
seeall
Note: this option does not remove the ability to load Lua files from
within C code (for example, using luaL_loadfile
).
Disable subprocess execution in Lua to prevent Lua from invoking other executables. Setting this will remove the following features, which provide Lua's subprocess capabilities:
Disable ability for Lua scripts to explicitly terminate their own process. This does not prevent other behaviours such as unhandled errors or failed assertions from doing so, however. Setting this will remove the following feature, which provides Lua's exit capability: