sqlite.lua icon indicating copy to clipboard operation
sqlite.lua copied to clipboard

Add support for vanilla Lua(not only Luajit)

Open astrolemonade opened this issue 2 years ago • 5 comments

astrolemonade avatar Oct 25 '21 19:10 astrolemonade

I think it's possible with a package I saw that provide luajit for vanilla lua, but not sure what was it's name. If anyone interested in tackling this a PR is welcomed

kkharji avatar Oct 25 '21 20:10 kkharji

Is this the one https://gist.github.com/meepen/807dd81a572ffb0f28a8c44c04922fdd or https://gist.github.com/constfold/ca2f9788c860b753a6300330dbecb721/ ?

astrolemonade avatar Oct 25 '21 20:10 astrolemonade

Not quite sure. I thought I saw luarock that does this. but this maybe tested.

kkharji avatar Oct 25 '21 21:10 kkharji

https://github.com/torch/luajit-rocks ?

astrolemonade avatar Oct 26 '21 09:10 astrolemonade

You need ffi to make this available in vanilla lua 5.1. There is this package you could locally install: https://github.com/facebookarchive/luaffifb but this is nothing we can really support here. Maybe with luarocks, but i am not familiar enough with that that i wanna look into that.

An alternative would be to write this plugin in c as native lua module (or in rust with mlua). This would remove the ffi requirement but thats just a lot of work and probably not worth it.

Conni2461 avatar Oct 26 '21 09:10 Conni2461