lua-users home
lua-l archive

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


> The thing is: wrapping a C/C++ library manually gives me the
> opportunity to re-work the original API into something that's much
> more "scripting-friendly". The last thing I'd want is end up with a
> near-literal Lua translation of the C/C++ stuff...

Certainly, if you are writing a "real" library (for others to use, with
proper documentation and distribution), this is the right approach.  A
C API is usually not "scripting-friendly" at all and a good Lua library
should be as "lua-like" as possible.

On the other hand, if all you want is to access some external facility
available in C, for your use only, then a tool like tolua may be quite
useful, mainly if you have to use several big libraries.

Finally, a tool like LuaDeclare, where you do not need any binding code
at all, is also very useful for quick-and-eventually-dirty access to C
facilities.

There is room for all approaches :)

-- Roberto