The Lua programming language with CMake based build

Related tags

Miscellaneous lua
Overview

README for Lua 5.1 Build Status

See INSTALL for installation instructions. See HISTORY for a summary of changes since the last released version.

What is Lua?

Lua is a powerful, light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone language. Lua is free software.

For complete information, visit Lua's web site at http://www.lua.org/ . For an executive summary, see http://www.lua.org/about.html .

Lua has been used in many different projects around the world. For a short list, see http://www.lua.org/uses.html .

Availability

Lua is freely available for both academic and commercial purposes. See COPYRIGHT and http://www.lua.org/license.html for details. Lua can be downloaded at http://www.lua.org/download.html .

Installation

Lua is implemented in pure ANSI C, and compiles unmodified in all known platforms that have an ANSI C compiler. In most Unix-like platforms, simply do "make" with a suitable target. See INSTALL for detailed instructions.

Origin

Lua is developed at Lua.org, a laboratory of the Department of Computer Science of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro in Brazil). For more information about the authors, see http://www.lua.org/authors.html .

Issues
  • LUAI_MAXSHORTLEN missing

    LUAI_MAXSHORTLEN missing

    I needed this patch for LuaDist to build on linux (and I assume everywhere else). It looks like Lua 5.2.1 added the constant LUAI_MAXSHORTLEN, which was missing from src/luaconf.h.in. This patch just pulls in the relevant lines, and allows lua to compile.

    Reviewing the update to Lua 5.2.1 more generally, it looks like the update of src/luaconf.h.in undid some LuaDist-specific stuff and missed some other vanilla Lua updates. I started to make a more general patch, but decided that I didn't know how to handle the LuaDist-specific stuff. For instance, are we supposed to let cmake or luaconf.h configure the platform-specific path/directory variables?

    opened by yamad 3
  • Fixed a signed integer overflow check.

    Fixed a signed integer overflow check.

    Signed integer overflow is undefined behavior in C. In this commit we patch a signed integer check in ltablib.c in the function unpack.

    This patch may need to be modified under the constraints of two operations

    ltablib.c:140
    i = luaL_optint(L, 2, 1)
    
    ltablib.c:141
    e = luaL_opt(L, luaL_checkint, 3, luaL_len(L, 1)
    

    Here, we assume i and e can be any value in its given type, int. If this is true, we must check for some special cases. If i is INT_MIN, we can't just take the negative value of it, as -INT_MIN = INT_MAX+1 (theoretically) which is undefined behavior.

    The original check against the value of

    n = e - i + 1
    

    was

    n <= 0
    

    to check for signed integer overflow. Signed integer overflow is undefined behavior.

    opened by jaredlwong 1
  • fix error and mem leak found by cppcheck

    fix error and mem leak found by cppcheck

    I ran cppcheck on luaDist/lua and it found these errors: loadlib_rel.c 202 resourceLeak error Resource leak: fd loadlib_rel.c 193 uninitvar error Uninitialized variable: n

    First one was in the #else and second one in the #elif defined(APPLE)

    opened by GregAujay 1
  • Add missing LUA_BUILD_AS_DLL definition to the liblua target.

    Add missing LUA_BUILD_AS_DLL definition to the liblua target.

    Fixes lua.dll being generated without public symbols by the Visual Studio compiler;

    • when building a DLL you either need a DEF file listing the public symbols or use __declspec(export) in the public symbols.
    • when linking to a DLL you only need to use __declspec(import) when referencing data, since lua only exports functions it isn't needed for the other targets.

    Tested compilation in the following dev environments: (Windows 7)

    • Visual Studio 10 x86 + cmake 2.8.8
    • Visual Studio 10 x64 + cmake 2.8.8
    • MinGW + gcc 4.6.2 + cmake 2.8.5
    • MSYS + MinGW + gcc 4.6.2 + cmake 2.8.5
    • Cygwin + gcc 4.5.3 + cmake 2.8.7
    opened by flaviojs 1
  • cmake 2.8.8 configure error

    cmake 2.8.8 configure error

    I am using CMake 2.8.8 to build LuaDist and found that it rejects commands if they are on the same line. This pull request allows cmake to complete without errors.

    opened by yamad 1
  • Lua 5.3

    Lua 5.3

    upgrade to lua-5.3.3. i removed loadlib_rel from src, let lua process it (with env var or coded in script). and install_test and install_example are also removed.

    opened by xiaobin83 0
  • Add

    Add "LUA_LINK_MSVCRT_STATIC" option for Visual Studio target

    The new option "LUA_LINK_MSVCRT_STATIC" enables adding compile option "/MT" (or "/MTd" for Debug configuration) for Visual Studio generator. Without this option, all binaries will have dynamic linkage to "MSVCR120.dll" or something.

    opened by kbinani 0
  • Allow for optional static compilation by overriding BUILD_SHARED_LIBS to OFF

    Allow for optional static compilation by overriding BUILD_SHARED_LIBS to OFF

    The default remains building liblua as a shared library because BUILD_SHARED_LIBS is set to ON in dist.cmake. However, this patch makes it possible to build statically by changing this variable.

    opened by jklontz 0
  • add lua.hpp to install_header

    add lua.hpp to install_header

    It looks as though 5.2 accidentally dropped the included lua.hpp file from install_header. 5.1.5 still has it. This file is required for C++ projects using Lua.

    opened by dekimsey 0
  • Remove apparently accidental .orig file

    Remove apparently accidental .orig file

    There is a .orig file in the luadist lua repo.

    This is a file created by the git merge system. You almost certainly checked it to git by accident. It's not in the Lua 5.1.5 official release.

    Sometimes I run a script to make sure I'm not accidentally leaving any orig files around in my repo. It freaks out out on my luadist remote because of the orig file in there.

    Probably best to just delete it.

    opened by mcclure 0
  • Lua 5.3

    Lua 5.3

    Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18950. The C compiler identification is MSVC 19.23.28105.4 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done DIST_NAME: lua DIST_VERSION: 5.3.2 DIST_LICENSE: MIT/X11 DIST_AUTHOR: Roberto Ierusalimschy, Waldemar Celes, Luiz Henrique de Figueiredo DIST_MAINTAINER: Peter Drahoš DIST_URL: http://www.lua.org DIST_DESC: Lua is a powerful, fast, light-weight, embeddable scripting language. DIST_DEPENDS: Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find readline (missing: READLINE_LIBRARY READLINE_INCLUDE_DIR) Configuring done Generating done

    opened by kouzhudong 0
Owner
The Lua Language distribution [Archived]
The Lua Language distribution [Archived]
StarkScript - or the Stark programming language - is a compiled C-based programming language that aims to offer the same usability as that of JavaScript's and TypeScript's

StarkScript StarkScript - or the Stark programming language - is a compiled C-based programming language that aims to offer the same usability as that

EnderCommunity 5 May 10, 2022
🔥 A cross-platform build utility based on Lua

xmake A cross-platform build utility based on Lua Modern C/C++ build tools, Simple, Fast, Powerful dependency package integration Supporting the proje

xmake-io 5.3k Aug 8, 2022
PLP Project Programming Language | Programming for projects and computer science and research on computer and programming.

PLPv2b PLP Project Programming Language Programming Language for projects and computer science and research on computer and programming. What is PLP L

PLP Language 5 Jun 23, 2022
A dependency free, embeddable debugger for Lua in a single file (.lua or .c)

debugger.lua A simple, embedabble debugger for Lua 5.x, and LuaJIT 2.x. debugger.lua is a simple, single file, pure Lua debugger that is easy to integ

Scott Lembcke 576 Jul 23, 2022
The Lua development repository, as seen by the Lua team. Mirrored irregularly

The Lua development repository, as seen by the Lua team. Mirrored irregularly

Lua 5.9k Aug 7, 2022
CMake-based build system for node.js native modules

Node CMake A CMake-based build system for Node.js native modules, for CMake >= v3.1. Newly rewritten for 2.0! New Features Drop-in execution compatibi

Colin Taylor 75 Aug 1, 2022
A custom distribution of FreeImage, with a CMake-based build system. Used by the Athena Game Framework.

This is a custom distribution of FreeImage, version 3.13.1, with a XMake-based build system. License ------- FreeImage's license is unchanged: this

Philip Abbet 51 Apr 6, 2022
The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.

Wren is a small, fast, class-based concurrent scripting language Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in a fami

Wren 5.8k Aug 9, 2022
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Markus Moenig 89 Jul 4, 2022
Cmake check - Static analysis for CMake files.

cmake_check Cmake_check is a linter for the CMake language. It takes a set of user-defined rules and reports violations for CMakeLists.txt files and C

Dael 20 Mar 22, 2020
A set of tools allowing JUCE 6.1 + Cmake to build a CLAP

JUCE6/CMake Clap Support This is a set of code which, combined with a JUCE6/CMake project, allows you to build a (buggy, feature incomplete, work in p

Paul 0 Feb 15, 2022
FFF is a decentralized blockchain based on IPFS/RIPPLE, which integrates lua virtual machine-based smart contracts.

FFF is a decentralized blockchain based on IPFS/RIPPLE, which integrates lua virtual machine-based smart contracts. It is also a software platform designed to help coordinate voluntary free market operations amongst a set of social actors.

gen2600 5 May 31, 2022
frost is a programming language with a focus on low-friction systems programming.

❄️ frost frost programming language About frost is a programming language with a focus on low-friction systems programming.

null 4 Nov 12, 2021
A programming environment for Lua for the Raspberry Pi Pico microcontroller

picolua A programming environment for Lua for the Raspberry Pi Pico microcontroller. Version 0.3, April 2021 What is this? picolua is a proof-of-conce

Kevin Boone 51 Jul 31, 2022
A simple and easy-to-use Lua library to enjoy videogames programming

raylib-lua-sol Lua bindings for raylib, a simple and easy-to-use library to enjoy videogames programming, with sol (www.raylib.com) raylib-lua-sol bin

Rob Loach 62 Jul 13, 2022
A binding between C++11 and Lua language

lua-intf lua-intf is a binding between C++11 and Lua language, it provides three different set of API in one package: LuaBinding, Export C++ class or

Steve K. Chiu 397 Jul 17, 2022
🧠 An esoteric programming language based on Brainfuck

------------------------ aaa PROGRAMMING LANGUAGE ------------------------ aaa is an esoteric programming language based on Brainfuck ---------------

dacousb 12 Oct 13, 2021
An esoteric programming language based entirely on regexes

Resub An esoteric programming language built around regexes Resub (Regex Substitution or Repeated Substitution) is an esoteric programming language wh

null 6 Apr 18, 2022
An Esoteric Programming Language Using "Taiko" maps, Based on Brainfuck.

TaikoLang An Esoteric Programming Language Using "Taiko" maps, Based on Brainfuck. Language Design TaikoLang consists of eight commands, listed below.

AlwaysYes 3 May 17, 2022