[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Design mistakes in mixed C/C++ and Lua projects
- From: Miles Bader <miles@...>
- Date: Fri, 21 Oct 2011 18:07:58 +0900
Miles Bader <firstname.lastname@example.org> writes:
>>> The annoying problem though, is that LuaJIT+FFI, however great (and it
>>> is great!), isn't really a portable solution. Maybe some people don't
>>> care, but I do. I want to gain the benefits when possible, but still
>>> have the _ability_ to run with normal Lua (which is portable).
>> Someone recently ported FFI to regular Lua IIRC . This may be acceptable?
>>  http://lua-users.org/lists/lua-l/2011-07/msg00467.html
> If so, that's totally great -- less glue code needed!
> However I assume that FFI-in-normal-Lua doesn't have any of the speed
> advantage of FFI-in-LuaJIT, so for speed-critical functionality,
> things like bulk-interfaces are probably still necessary.
Ah, another issue I realized after looking at it: that package
("luaffi") isn't portable either... :]
I wonder if it's possible to do this portably (using info and functions
generated by a C compiler)?
Discriminate, v.i. To note the particulars in which one person or thing is,
if possible, more objectionable than another.