Integrating LLVM into Love2d
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Integrating LLVM into Love2d
Hi guys, I'am looking for a way how to integrate LLVM into lova2d? Any suggestions on how this can be done?
Last edited by max77 on Thu Jul 07, 2016 1:51 pm, edited 2 times in total.
Re: Integrating LLVM into Love2d
I don't know how and if that can be done, but I wanted to tell you that you can load C libraries using LuaJIT's FFI, just in case you didn't know. It's not exactly what you need, but it allows you to easily use a different language (although a specific one) to get math done faster.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Integrating LLVM into Love2d
I guess you can use LLVM C API using LuaJIT ffi like Nixola suggested.
Relevant: https://pauladamsmith.com/blog/2015/01/ ... c-api.html
Relevant: https://pauladamsmith.com/blog/2015/01/ ... c-api.html
Re: Integrating LLVM into Love2d
Can be interesting, but I think the cleaner way to do it is to add a custom C++ module directly within the Love2D executable (to have a "love.llvm" table in Lua). I think you need to search for tutorial or any documentation about LLVM directly. Maybe this can be useful.
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
github / linkpy
Re: Integrating LLVM into Love2d
Hello, guys, thank you for your responses!
I know there is Luabind - a library that creates bindings between C++ and Lua. It has the ability to expose functions and classes, written in C++, to Lua. Can it be used to add a custom c++ module/function directly to the Love2D executable? Any real example how to this in love2d sources would be very helpful.
I know there is Luabind - a library that creates bindings between C++ and Lua. It has the ability to expose functions and classes, written in C++, to Lua. Can it be used to add a custom c++ module/function directly to the Love2D executable? Any real example how to this in love2d sources would be very helpful.
Re: Integrating LLVM into Love2d
I don't know myself. You should go directly in the Love2D's source codes : https://bitbucket.org/rude/love .
Normally, within the module directory.
Normally, within the module directory.
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
github / linkpy
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 3 guests