jmckaskill / luaffi

Standalone FFI library for calling C functions from lua. Compatible with the luajit FFI interface.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Emscripten

TurkeyMan opened this issue · comments

Emscripten is an important target where LuaJIT is not supported.

commented

Emscripten is an LLVM-based C/C++ to WebAssembly compiler. Since luaffi is based on DynASM from LuaJIT which does not use LLVM, it seems highly unlikely to ever support such a thing.

It seem more plausible to add WebAssembly architecture support directly to DynASM and LuaJIT, although I doubt it will happen anytime soon unless someone else provides a patch/pull request.

Even if someone was considering making such a port, one would want to consider how valuable it would be considering WebAssembly is also a virtual machine which may have its own JIT implementation. It might be better to make an FFI without a JIT like DynASM for such a case.