Git Product home page Git Product logo

luabridge's Introduction


LuaBridge 2.6

LuaBridge is a lightweight and dependency-free library for mapping data, functions, and classes back and forth between C++ and Lua (a powerful, fast, lightweight, embeddable scripting language) . LuaBridge has been tested and works with Lua revisions starting from 5.1.5., although it should work in any version of Lua from 5.1.0 as well as LuaJit.

LuaBridge offers the following features:

  • MIT Licensed
  • A printable Reference Manual.
  • Headers-only: No Makefile, no .cpp files, just one #include!
  • Simple, light, and nothing else needed (like Boost).
  • No macros, settings, or configuration scripts needed.
  • Supports different object lifetime management models.
  • Convenient, type-safe access to the Lua stack.
  • Automatic function parameter type binding.
  • Easy access to Lua objects like tables and functions.
  • Written in a clear and easy to debug style.

Please read the LuaBridge Reference Manual for more details on the API.

Unit Tests

Unit test build requires a CMake and C++11 compliant compiler.

There are 4 unit test flavors:

  • Tests51 - uses Lua 5.1, with C++11 features
  • Tests51L - uses Lua 5.1, no C++11 features
  • Tests52 - uses Lua 5.2, with C++11 features
  • Tests52L - uses Lua 5.2, no C++11 features

Build using Make on Linux/MacOS:

clone --recurse-submodules [email protected]:vinniefalco/LuaBridge.git
cd LuaBridge
cmake -DCMAKE_BUILD_TYPE=Debug -B build
# or cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -B build
# or cmake -DCMAKE_BUILD_TYPE=Release -B build
cd build
make -j

Generate XCode project on MacOS:

clone --recurse-submodules [email protected]:vinniefalco/LuaBridge.git
cd LuaBridge
cmake -G Xcode -B build
# Generates XCode project build/LuaBridge.xcodeproj

Generate MSVS solution on Windows:

clone --recurse-submodules git@github.com:vinniefalco/LuaBridge.git
cd LuaBridge
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -B build
# or cmake -G "Visual Studio 14 2015" -B build
# or cmake -G "Visual Studio 15 2017 Win64" -B build
# or cmake -G "Visual Studio 15 2017" -B build
# or cmake -G "Visual Studio 15 2019" -A Win64 -B build
# or cmake -G "Visual Studio 15 2019" -B build
# Generates MSVS solution build/LuaBridge.sln

LuaBridge Demo

LuaBridge provides both a command line program and a stand-alone graphical program for compiling and running the test suite. The graphical program brings up an interactive window where you can enter execute Lua statements in a persistent environment. This application is cross platform and works on Windows, Mac OS, iOS, Android, and GNU/Linux systems with X11. The stand-alone program should work anywhere. Both of these applications include LuaBridge, Lua version 5.2, and the code necessary to produce a cross platform graphic application. They are all together in a separate repository, with no additional dependencies, available on Github at LuaBridge Demo and Tests. This is what the GUI application looks like, along with the C++ code snippet for registering the two classes:


Official Repository

LuaBridge is published under the terms of the MIT License.

The original version of LuaBridge was written by Nathan Reed. The project has been taken over by Vinnie Falco, who added new functionality, wrote the new documentation, and incorporated contributions from Nigel Atkinson.

For questions, comments, or bug reports feel free to open a Github issue or contact Vinnie Falco directly at the email address indicated below.

Copyright 2019, Dmitry Tarakanov
Copyright 2012, Vinnie Falco (<[email protected]>)
Copyright 2008, Nigel Atkinson
Copyright 2007, Nathan Reed

Portions from The Loki Library:
Copyright (C) 2001 by Andrei Alexandrescu

Older versions of LuaBridge up to and including 0.2 are distributed under the BSD 3-Clause License. See the corresponding license file in those versions (distributed separately) for more details.

luabridge's People

Contributors

asomfai avatar chernikovdmitry avatar d-led avatar dmitry-t avatar fulgen301 avatar grandmother avatar nikita-yfh avatar pinemarten avatar progschj avatar redbaron avatar reedbeta avatar ricanteja avatar rpatters1 avatar ryanel avatar shenyalei avatar skabyy avatar stefanfrings avatar timgates42 avatar tobiasfunk avatar toski avatar vinniefalco avatar xrl1 avatar zeromus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.