LuaJIT interface

Plug-in and third party software discussion.
Post Reply
immortalx
Posts: 2
Joined: Tue Sep 05, 2023 5:34 am

LuaJIT interface

Post by immortalx »

Hi everyone.
I'm working on a LuaJIT interface with everything. I'm using the ffi library which I'm not very familiar with, so I don't know if I'm on the right track with the way I'm doing things. Also, I'm using LuaJIT through a game framework called LÖVR so I'm not sure how it behaves on other LuaJIT versions.
For the time being I implemented just a dozen functions or so:

https://github.com/immortalx74/lua-everything
therube
Posts: 4952
Joined: Thu Sep 03, 2009 6:48 pm

Re: LuaJIT interface

Post by therube »

(Since I didn't know.)

Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.


And what, someone could take your code (.lua) [or create their own] & call that from within their program, is that the idea?


mpv (mpv.net) can use ".lua" scripts.
So if you wanted to do something like crop a video (which mpv does not do natively), you can call "easycrop.lua" to do it.

User Scripts add functionality that is not part of the core mpv player. Most of these scripts are unofficial 3rd party scripts. Anyone can add their own script.
immortalx
Posts: 2
Joined: Tue Sep 05, 2023 5:34 am

Re: LuaJIT interface

Post by immortalx »

I haven't used mpv.net so I'm not entirely sure, but with a quick glance it seems it's using LuaJIT, so probably it should work.
So in essence whatever application uses Lua (with LuaJIT compiler, not plain Lua. There's a difference) for scripting, should be able to use these bindings to call Everything functions using Lua code.
Post Reply