3 ms·
> Since Lua is more typically used for extension and embedding The LuaJIT (http://luajit.org http://luajit.org) is another reason why Lua is very popular (alth
by fosk 9y ago
> Since Lua is more typically used for extension and embedding
The LuaJIT (http://luajit.org http://luajit.org) is another reason why Lua is very popular (although it only officially supports Lua 5.1). It’s a very fast implementation of the Lua VM. OpenResty (https://openresty.org/ https://openresty.org/) is a very popular framework that allows Lua scripting on top of NGINX and LuaJIT, and it’s the same stack that Cloudflare uses. Basically over 5% of the world internet traffic goes through Lua, but only a few people know it.
This is the same stack that Kong (https://github.com/Mashape/kong https://github.com/Mashape/kong) also uses, probably the most popular OpenResty-based application. Lua on top of LuaJIT can be extremely fast especially if you leverage FFI.
Lua is an extremely simple language which can be pretty much embedded anywhere, and the LuaJIT just does a great job at making it extremely embeddable and fast.
Disclaimer: I am a core committed at Kong.
- sitkack 9y agoIt isn't strictly 5.1, more of a hybrid with a 5.2 features rolled in.