lua: Lua, an embeddable scripting language

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This package provides bindings and types to bridge Haskell and Lua.

The full Lua interpreter version 5.4.4 is included. Alternatively, a system-wide Lua installation can be linked instead.


[Skip to Readme]

Properties

Versions 1.0.0, 2.0.0, 2.0.0.1, 2.0.1, 2.0.2, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1, 2.3.1, 2.3.2, 2.3.3
Change log CHANGELOG.md
Dependencies base (>=4.11 && <5) [details]
License MIT
Copyright © 2007–2012 Gracjan Polak; © 2012–2016 Ömer Sinan Ağacan; © 2017-2023 Albert Krewinkel
Author Albert Krewinkel
Maintainer Albert Krewinkel <tarleb@hslua.org>
Category Foreign
Home page https://hslua.org/
Bug tracker https://github.com/hslua/hslua/issues
Source repo head: git clone https://github.com/hslua/hslua.git(lua)
Uploaded by tarleb at 2023-03-17T17:23:12Z

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
system-lua

Use the system-wide Lua instead of the bundled copy.

Disabled
apicheck

Compile Lua with -DLUA_USE_APICHECK.

Disabled
lua_32bits

Compile Lua with -DLUA_32BITS

Disabled
allow-unsafe-gc

Allow optimizations which make Lua's garbage collection potentially unsafe; enabling this should be safe if there are no callbacks into Haskell during Lua garbage collection cycles. The flag should be *disabled* if Lua objects can have Haskell finalizers, i.e., __gc metamethods that call Haskell function.

Enabled
export-dynamic

Add all symbols to dynamic symbol table; disabling this will make it possible to create fully static binaries, but renders loading of dynamic C libraries impossible.

Enabled
pkg-config

Use pkg-config to discover library and include paths. Setting this flag implies `system-lua`.

Disabled
cross-compile

Avoids constructs that would prevent cross-compilation. The Lua version constants may become inaccurate when this flag is enabled.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for lua-2.3.1

[back to package description]

lua

Build status AppVeyor Status Hackage

The lua package provides a Lua interpreter as well as bindings, wrappers and types to combine Haskell and Lua.

Overview

Lua is a small, well-designed, embeddable scripting language. It has become the de-facto default to make programs extensible and is widely used everywhere from servers over games and desktop applications up to security software and embedded devices. This package provides Haskell bindings to Lua, enable coders to embed the language into their programs, making them scriptable.

This package ships with the official Lua interpreter, version 5.4.4. Cabal flags allow to compile against a system-wide Lua installation instead, if desired.

Build flags

The following cabal build flags are supported:

Example: using a different Lua version

To use a system-wide installed Lua when linking lua as a dependency, build/install your package using --constraint="lua +system-lua". For example, you can install Pandoc with hslua that uses system-wide Lua like this:

cabal install pandoc --constraint="lua +system-lua"

or with stack:

stack install pandoc --flag=lua:system-lua