lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi James,

> 1) Does everybody using C++ usually write their own Lua API wrapper (as
> I am currently using) or is there a common way for C++ developers to do
> this (like toLua seems to be _the_ tool for it's job).

We design and implement each Lua - C/C++ interface manually, and for a
reason.  Following the discussions on this list I get the impression that we
might be a minority in this respect.  However, for us it has worked just
great.

The various interfaces we've implemented thusfar (including UI bindings, XML
handling and (proprietary) DB access) are all rearranged significantly
compared to their C/C++ counterparts.  These changes greatly enhance the
usability of each respective lib in a scripting environment.  I doubt that
any auto generation tool could do the same, but I have to admit that we
never seriously tried one (and still don't feel the need.)

Design and implementation of most interfaces didn't take very long.  I'd say
a single day tops (including testing.)  The UI one is a bit of an exception
because we expand it on a need-to basis (and the C API is of course rather
large as well :-)

Finally, doing the interfaces by hand is a great way to get familiar with
both the C and scripting sides of Lua.  I highly recommend it!

Bye,
Wim