Diluculum
Making Lua and C++ live happily together
Diluculum is a library that intends to make the coexistence
of C++ and Lua more
harmonious. In this regard, it offers essentially three
"services":
- A nice way to access data stored in a Lua interpreter.
- A not so bad way to write functions in C++ and make them
available to Lua.
- A limited and just barely usable way to register C++
classes and objects in a Lua state.
Assorted facts about Diluculum
Diluculum...
- Is fully
documented. In particular, check
the User's
Guide for some examples of use. (There used to be a
Russian version of the User's Guide, provided by
Dmitriy Shmikov, but the link is broken by now).
- Has unit tests for pretty much everything in it.
- Requires Lua 5.1. It will not compile with Lua 5.0.
- Is reasonably portable. It should work at least under
Linux with GCC 4.x and under Windows with Visual Studio
2008.
- Depends on Lua
and Boost.
- has a build system based
on CMake, but I
strongly recommend to add Diluculum source files directly
to your own projects.
- Is distributed under the MIT license (the same as Lua).
- Means something like "dawn" or "daybreak" in Latin,
according to a dictionary I consulted some day.
Latest version
Latest version is 0.5.1, released on 02010-01-15. It can be
downloaded here: Diluculum-0.5.1.tar.gz.
This is a minor release, with a single addition:
- Added a method
LuaState::globals(), which
provides access to the table of gloabals (AKA "_G"). This
was implemented in response to a bug report by Yuriy
Shmal.
Old versions
- Diluculum 0.5
(Diluculum-0.5.tar.gz),
02009-07-22.
- Added support to store functions in
LuaValues. This allows some nice tricks like
letting the Lua side register callbacks implemented in
Lua, that will be eventually called by the C++ side (and
this works even with anonymous functions).
- Removed the dependency on Boost.Variant. Boost is still a
dependency, but this will reduce the size of the binaries
considerably, specially in debug builds. (Thanks to Jason
Gauci for the initial implementation of this feature.)
- Added a
LuaValue::asObjectPtr() method, that
provides handy access in the C++ side to a pointer to
objects instantiated in Lua. (Another feature by Jason Gauci.)
- Added a
LuaValue::asInteger()
method. (Yet another contribution of Jason Gauci.)
- The build system has been changed to CMake. Anyway, I
strongly recommend everyone to add Diluculum source files
to their own projects.
- Fixed some little bugs here and there.
- Diluculum 0.4
(Diluculum-0.4.tar.gz),
02007-02-06.
- When exporting C++ classes to Lua, it is no longer necessary
to call two macros for each exported method.
- Added support for creating dynamically loadable modules
(those Lua modules stored in a dynamic library, which is
loaded when the Lua programmer says
require
"MyModule").
- Diluculum 0.3.1 (Diluculum-0.3.1.tar.gz,
02006-07-26).
- Fixed a small (not so small, depending on how you see
it...) error in the definition of the
DILUCULUM_REGISTER_OBJECT() macro.
- Added a Makefile for Linux/GCC.
- Added a Code
Blocks project file, contributed by Hakki Dogusan.
- Diluculum 0.3 (Diluculum-0.3.tar.gz,
02006-07-03).
- The first public release.
Contact
Diluculum is developed by Leandro Motta Barros. The preferred
channel to talk about Diluculum is its mailing
list. Anyway, if you really, really want to contact the
author directly, send your inquiries to
lmb@sta
c
k es.or
edbox g