Skip to content

Latest commit

 

History

History
110 lines (70 loc) · 3.46 KB

README.md

File metadata and controls

110 lines (70 loc) · 3.46 KB

Delua

This is Lua 5.4.7, released on 13 Jun 2024 (see file lua/README).

Lua is a powerful, efficient, lightweight, embeddable scripting language.
It supports procedural programming, object-oriented programming, functional
programming, data-driven programming, and data description.

Delua is the cmake'ified Lua source. It may be used to build Lua binaries and packages on all major operating systems supported by CMake, or, can be embedded in other projects.

Modifications

General

The Lua sources, except ''luaconf.h'' - which is now generated using CMake, are
almost untouched. Changes made to the pure Lua sources can be found in the
''patches'' sub-directory.

A number of considerable changes were made to ''luaconf.h'' so. This includes, for example, that LUA_LDIR and LUA_CDIR where changed in non-backward compatible way. Also, LUA_PROGNAME is now part of ''luaconf.h''.

Program directory

A "program directory" has been supplemented (see LUA_PROGDIR in ''luaconf.h''). This directory (see also LUA_VDIR) is used to store, for example, the REPL history.

Readline

The REPL history, if the underlying operating system supports "readline", is stored in a history file in the program/version folder. As well, a rudimentary form of tab-completion for table elements is supported.

Search paths

Local home directory

The default search path includes the ~/.local/ file-system structure on
Unixoid systems, ~\AppData\Local\${LUA_PROGNAME} on Microsoft Windows®, and,
~/Library/${LUA_PROGNAME} on MacOS. Here, '~' (LUA_HOME_MARK) now expands to the environment variables USERPROFILE on Microsoft Windows® or HOME otherwise.

Note: At the time of writing, Windows and MacOSX builds are not tested.

Extra paths

Additional default search paths can be provided through LUA_PATH_EXTRA and
LUA_CPATH_EXTRA in the CMake configuration.

C++

C++ libraries can be build using the LUA_LANGUAGE_CXX configuration option. The libraries are suffixed with "++" compared to their standard C versions.

Additionally, lua_Exception was added to the generated ''luaconf.h'' header.

For further details: UTSL.

Extensions

A number of Lua extensions are provided out of the box with DeLua. This includes some extensions to the default modules (such as io), package management, a generic class system, and more.

Standard modules

TODO

Package management

TODO

Classes

TODO

Build options

General options

  • LUA_PROGNAME, output name of binaries and libraries (default: "delua").
  • LUA_BUILD_STATIC Build a static library (default: YES).
  • LUA_BUILD_SHARED Build a shared library (default: YES).
  • LUA_BUILD_INTERPRETER Build the standard lua interpreter (default: YES).
  • LUA_BUILD_COMPILER Build the standard luac compiler (default: YES).

Languages

  • LUA_LANGUAGE_C Build C-compiled libraries (and executables, default: YES).
  • LUA_LANGUAGE_CXX Build C++-compiled libraries (default: YES).

System and user configuration

CMake will figure out system specific settings (such as DLL support on Windows�,
readline etc. on other systems). Additionally, the following ''luaconf.h'' flags can
be set using CMake:

  • LUA_32BITS
  • LUA_USE_C89
  • LUA_USER_H

For details and more options, see build/luaconf.cmake or use the cmake-gui.

Embedding

TODO