lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi list,
 
I'm working on a project that absolutely require premptive multithreading (multiple hardware threads are available) and some good runtime performance. I'm trying to write it almost exclusively in Lua to reduce development time and complexity (I have a 90%-lua/10%-C/C++ ratio). I'm using Lua 5.1. I'm trying to use standard unpatched Lua to ease evolution and maintenance. I don't need to support multiple Lua versions, but I want to incorporate easily Lua evolutions in the project. I use custom Makefiles and was used to build a lua.dll and lualib.dll pair instead of a single lua50.dll. With Lua 5.1 I had to patch some files to allow seperation of core and lib.
 
So I'm using LuaThreads (I did a custom port to 5.1) and I tried to use LuaJIT with it. All my personnal code is in seperate modules, so I modified LuaThreads (both for integration in 5.1, seperation of core and lib and for better granularity) and I'm in the process to do the same with LuaJIT, to make things clear (however LuaJIT seems to be developped with statically linked core and lib since there are heavy dependencies between ljitlib and lua core internal functions). The problem is that both use LUAI_EXTRASPACE in lua_State-s and need their callback to be called properly.
 
I'm also planning to use lua_tcc at some point to optimize by hand some part of my engine. The principle would be to turn static data of my problem into ultra-specific hardcoded C routines that would be almost optimal with no cost in data complexity.
 
So here are my important questions :
- is there a framework somewhere to ease coexistence of multiple heavy Lua mods (those that use LUAI_EXTRASPACE and eventually patch lua source code), some standard mod in which Lua plugins could register their callbacks ?
- did somebody achieved to make LuaThreads and LuaJIT coexist in the same build (even experience with 5.0.x would help me) ?
- are there some expected fundamental issues or incompatibilities that would theoretically prevent me from using LuaJIT and LuaThreads together ?
- did somebody achieved to make LuaJIT and lua_tcc coexist ? (I haven't tried yet since I have problem with tcc relocation, but I guess two relocating runtime compilers in the same dynamically linked process may not like each other)
 
And some less important questions :
- did someone achieved to seperate LuaJIT core and lib code ?
- did someone achieved running lua_tcc under win32 with linking and relocation to liblua.a while lua.dll is already loaded in the process ?
 
Doub.