Re: LuaJIT and WebAssembly

  • From: Sebastian Neusser <s.neusser@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 11 Aug 2022 14:20:35 +0200

I researched this topic a while back, here's what I found:

You could build a LJ version and run without the JIT. See
https://github.com/Davidobot/megasource which is used in
https://github.com/Davidobot/love.js

It should be possible to build a wasm backend for LuaJIT or any JIT
compiler (well, maybe not for me :) ) , see here:
https://github.com/emscripten-core/emscripten/issues/7082 and here
https://gist.github.com/AlexAltea/78e8da45e20fdb1bf2afb8816de53bae

Also this seems interesting: https://webvm.io/
LuaJIT is in the demo, performance is about 80% of what I get natively on
my machine.

Regards
Sebastian


Am Do., 11. Aug. 2022 um 11:01 Uhr schrieb David Dengg <
david.dengg@xxxxxxxxx>:

Hello LuaJit List,

we want to use LuaJIT in our company but we also target the web. Right now
we use Emscripten to compile our C++ code to WebAssembly. Would it be
possible to bring the full speed of LuaJit to WebAssembly?

We are open to sponsoring the project if it we can have the full speed of
it on the web.

I also looked into compiling Lua code directly to WebAssembly and I think
the best way would be to convert it to TypeScript. Am I missing something?

Thanks,
David

Other related posts: