rrthomas / lrexlib

A Lua (5.1 and later) binding of various regex library APIs (POSIX, PCRE, PCRE2, GNU, Oniguruma and TRE)
Other
161 stars 29 forks source link

LuaJIT #12

Closed PaulBernier closed 10 years ago

PaulBernier commented 10 years ago

Hi,

Is there any plan on making your amazing library compatible with LuaJIT 2.0? I'm well aware that's quite a big work, but I'd be interested in the porting of the PCRE flavor for LuaJIT. So if you're bored, this is an idea of improvement :) By the way I'm using your lib in my project castl, and it does a great job, thanks!

Best

shmuz commented 10 years ago

What do you mean by "compatible"? I use it with LuaJIT 2.0 all the time...

shmuz commented 10 years ago

I guess you meant "rewriting Lrexlib in Lua using the FFI". It's quite a bit of interesting work, yes. But given the fact Lrexlib works with LuaJIT as it is, there's little incentive to rewrite it.

PaulBernier commented 10 years ago

Oh I'm sorry, I didn't know that LuaJIT was "fully ABI-compatible to Lua 5.1 at the linker/dynamic loader level", I thought that you had to rewrite some parts specifically for LuaJIT. And when I tried the last time it failed because my luarocks compiled for Lua 5.2 by default. I forced to compile it for Lua 5.1 and it works perfectly with LuaJIT, thanks! For the idea of using FFI it'd be pretty cool, but I agree with you I don't think it's worth the work.