derelict-lua 1.2.0

A dynamic binding to the Lua scripting language library.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

DerelictLua

A dynamic binding to version 5.2 of the Lua scripting language for the D Programming Language.

The preferred way of using DerelictLua is with the DUB package and build manager.

##Using DerelictLua with DUB management##

Put the following dependency into your project's package.json, like so:

{
    ...
    "dependencies": {
        "derelict_extras-lua": "~master"
    }
}

##Using DerelictLua with manual management##

See the Using Derelict page at The One With D.

##Setting up the Lua dynamic library##

Depending on your operating system, you will need one of the following dynamic libraries accessible to the D linker:

  • lua52.dll (Windows)
  • liblua5.2.so (POSIX)

On Windows, you can simply download a pre-built Lua 5.2 binary. On a POSIX system, Lua 5.2 will likely be available through your package manager. If pre-built binaries are not available or not preferred, the Lua 5.2 source code package is programmed in ANSI C and can be built by any ANSI compliant C compiler.

After the dynamic library has been downloaded or compiled, just put it in a directory included in your PATH environmental variable. Alternatively, you can use the lflags build setting in DUB or the -L command line argument in most D compilers.

##Loading Lua library via DerelictLua##

Once the Lua 5.2 dynamic library is accessible to your D linker, you can start using the Lua 5.2 C API by loading DerelictLua:

import derelict.lua.lua;

void main()
{
    // Load the Lua library.
    DerelictLua.load();

    // Now Lua functions can be called.
    ...
}

For more in-depth information on how to load DerelictOrg libraries, see DerelictUtil for Users.

From here, you can utilize tutorials and other information resources about the Lua 5.2 C API.

##See Also##

  • LuaD – A D binding for the Lua 5.1 C API with a convenient wrapper
Authors:
  • Richard Cattermole
  • Mike Parker
  • Jonathan Giroux
  • Kyle Hunter
Dependencies:
derelict-util
Versions:
2.0.0-beta.2 2017-Aug-11
2.0.0-beta.1 2017-Jun-04
2.0.0-alpha.2 2017-Apr-24
2.0.0-alpha.1 2017-Feb-28
1.3.1 2017-Apr-22
Show all 15 versions
Download Stats:
  • 0 downloads today

  • 1 downloads this week

  • 1 downloads this month

  • 1033 downloads total

Score:
2.0
Short URL:
derelict-lua.dub.pm