LAV with Lua

6 views
Skip to first unread message

Chris Norman

unread,
Jun 4, 2017, 5:33:27 PM6/4/17
to libaud...@camlorn.net
Hi,
Firstly I really hope I've got the right email address for the list! :-)

I'm just reading about Lua (mainly for MUSHclient) and I see it can load
DLLs. So I'm wondering if I can use it with Libaudioverse, and if so, do
I write my own bindings or are there plans to do them already?

BTW, I have no problems with writing my own bindings, but I seem to
remember you using some kind of wizardry to make bindings, so if I start
off with that it'll prevent the need to (possibly) convert my code later on.

Thanks muchly,

Chris

Austin Hicks

unread,
Jun 8, 2017, 12:28:54 PM6/8/17
to libaud...@camlorn.net
There is binding creation wizardry, yes. And one of these days I'm
going to finish making it work. Or drop it. I'm not entirely sure
which. If we ever have enough people volunteering to maintain bindings,
it might be worth killing it off.


Bindings to Lua is an interesting question. The answer is no, it's not
planned. The reason is that using it depends on whether or not you're
using LuaJIT, whether or not the app can load Lua C extensions, and what
kinds of APIs the app provides. To my knowledge, there is no equivalent
of ctypes. We can't just write one Lua binding as far as I know.

Lua is also 99.99% used by things that provide the I/O services--that
is, it's a scripting language for game behavior, not game presentation.
Engines are then usually ported to multiple platforms, exposing a
minimal I/O API to Lua. The only thing I even know of offhand that uses
Lua for something else is Mushclient.

Depending what you need, calling the DLL yourself isn't an unreasonable
approach.
Reply all
Reply to author
Forward
0 new messages