[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: MySQL in LUA
- From: Javier Guerra <javier@...>
- Date: Mon, 8 Feb 2010 15:16:53 -0500
On Mon, Feb 8, 2010 at 2:11 PM, BLAKEscIence bs <email@example.com> wrote:
> Do you think that the '.dll' file is the only way to use MySQL with LUA
the problem is that on one hand you have Lua, and on the other hand
you have a C library that doesn't know anything about Lua (the MySQL
client library). the only way to bind those is to write a new C
library that uses both the MySQL C API and the Lua C API. that's what
you call "the .dll". AKA a binding library.
what other possible solutions could be?
- you could write a binding in Lua with the Alien library; but Alien
is also a C library.
- in theory you could directly write to the MySQL wire protocol,
bypassing the MySQL client library; but that means using a library
like LuaSocket to get to the wire. And yes, LuaSocket is also a C
in short: if you have Lua but can't extend it, there's a lot you won't
be able to do.