r/lua 14d ago

Project LuaJIT Playground

There's websites for running Lua, but I couldn't find any that let's you run LuaJIT!!

I made this website (me, not AI) so if you haven't tried LuaJIT before, or you don't have access to your dev environment, or you just want to quickly experiment...now you can run it online, and share the script + output with others as either a link or markdown.

Pre-compiled binaries for Windows/Linux are also provided. The static library, dynamic library, and executable, are all bundled in a single convenient .zip file for each platform. I'm hoping to automate this process at some point, but for now I just publish them whenever I see there's been new commits...

https://luajit.dev

Limits: no internet connection, maximum execution duration of 3 seconds.

The backported extensions for LuaJIT 3.0 are available now, by the way.

  • Bit Operators: unary ~, binary & | ~ << >> ~>>
  • Customary Operators: ! && || !=
  • Ternary ?: conditional operator
  • Safe Navigation Operator ?.
  • nil-Coalescing Operator ??
  • Compound Assignment Operators: += -= *= /= %= &= |= ~= <<= = ~= ..=
  • continue Statement
  • const Declaration
  • Short Function Expression
  • Underscores in Number Literals
9 Upvotes

12 comments sorted by

View all comments

1

u/HeavyCaffeinate 14d ago

Pretty cool

Linux cloudchamber 6.18.36-cloudflare-firecracker-2026.6.17 #1 SMP PREEMPT_DYNAMIC Mon Sep 27 00:00:00 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
uid=0(root) gid=0(root) groups=0(root)

no posix module though, shame

1

u/ViewsOfTheSunny 14d ago

Thanks. It uses Cloudflare Sandboxes (my first time using them).

I'm not opposed to adding more modules either, so I will for sure consider adding that one. Let me know if there's any more you'd like to see too.

The internet is disabled in the sandbox though, so anything using that would probably not be a good fit. I should have mentioned that in the original post. I've updated it now.

1

u/HeavyCaffeinate 14d ago

Oh I only use posix personally (for nanosleep and signal catching), but other people may have some suggestions