libvips / lua-vips

Lua binding for the libvips image processing library
MIT License
125 stars 10 forks source link

Can I use lua rather than luajit? #40

Closed maobaoqi closed 3 years ago

maobaoqi commented 3 years ago

luajit is fast but old,I make several packages based on lua5.4. Can I use the libvips lua bindings with official lua?thanks

jcupitt commented 3 years ago

Hi @maobaoqi,

lua-vips uses luajit's FFI system, so as long as there's a Lua rock that implements a luajit-compatible FFI API, it should work.

I remember looking at this a year or two ago and not finding something suitable, but perhaps the situation is better now.

maobaoqi commented 3 years ago

@jcupitt thanks for reply. I found that there is a package called luaffi which maybe support newer official lua. so could I use this luaffi with libvips lua binding and to avoid luajit?

jcupitt commented 3 years ago

I'd think so, though you might need to do a bit of work. lua-vips is only 1500 lines of code so it shouldn't be too painful.

maobaoqi commented 3 years ago

ok,I will try. thanks you!

jcupitt commented 3 years ago

If you get it working, a PR would be very welcome.