This is a build2 package repository for the Lua scripting language. Lua is intended to be used both as an embeddable language for any program that needs one, and as a lightweight and efficient stand-alone language.
This repository is a community-maintained effort and is not officially endorsed by the Lua authors.
| Package | Summary | Status |
|---|---|---|
liblua |
Lua C/C++ Library | |
lua |
Lua Interpreter and Compiler |
If you want to use one of the Lua packages in your build2-based project, add an appropriate repository manifest to your project's repositories.manifest and refer to the accompanying package descriptions.
To be able to fetch this repository's packages, add one of the following prerequisites to your project's repositories.manifest.
Option A: cppget.org (Recommended)
Based on your project's stability requirements, choose either the stable section for thoroughly tested versions or the testing section for the latest releases before they are marked as stable.
For example:
:
role: prerequisite
location: https://pkg.cppget.org/1/stable
# trust: ...
Option B: Git Repository
:
role: prerequisite
location: https://github.com/build2-packaging/lua.git
The development setup for this repository uses the standard bdep-based workflow.
For general information and guidance on package maintenance, please see the build2 Documentation.
First, clone the repository via SSH or HTTPS.
git clone --recurse https://github.com/build2-packaging/lua.git # HTTPS
git clone --recurse git@github.com:build2-packaging/lua.git # SSH
Inside the repository's directory, initialize your build configuration.
bdep init -C @gcc cc config.cxx=g++ config.install.root=../.install config.dist.root=../.dist
Afterwards, use b or bdep to build, test, install, and distribute the packages.
-
Upstream Sources: Lua's source code and test suite are not available as versioned Git repositories. They are manually copied into the
upstream/andupstream-tests/directories from the official download and testing pages. TheLICENSEfile is also copied from the Lua website. For each version update, it is recommended to directly delete theupstream/andupstream-tests/directories and move the newly downloaded sources to these locations. -
Packaging Decisions:
- The
luaandluacexecutables are kept in a singleluapackage to simplify maintenance and maintain backward compatibility. - Documentation files are only installed with the
luapackage to prevent redundancy. - The packages build Lua's source code using a C compiler by default, as this is the library's native language. While the sources are compatible with C++ compilers, this choice could introduce subtle differences in areas such as linker and standard library behavior, compiler optimizations, or error reporting. If building with a C++ compiler is a requirement for your project, please open an issue to discuss the possibility of adding a configuration variable.
- The
-
Testing Limitations:
- Upstream does not provide a comprehensive test suite for the C library; therefore, the
libluapackage only includes basic smoke tests. - The
luacexecutable in theluapackage is built but not extensively tested due to a lack of upstream tests. - The
lua-testspackage executes only the basic Lua script tests. The complete or internal test suite is not used as it is expected to fail by design in this build context (see here). - On Windows (MSVC/Clang), the basic tests are known to fail in unoptimized builds, likely due to an intentional stack overflow test.
- Upstream does not provide a comprehensive test suite for the C library; therefore, the
-
Currently, the
luaandluacexecutables in theluapackage do not provide anybuild2metadata.
Contributions are welcome and greatly appreciated!
Please start by opening an issue to report a bug, suggest an improvement, or request a version update.
This helps us coordinate efforts and avoid duplicate work.
You are then welcome to submit a pull request that references the issue.
For guidance on package maintenance, please see the build2 Packaging Guidelines.