fengari
fengari-web
Our great sponsors
fengari | fengari-web | |
---|---|---|
24 | 3 | |
1,751 | 227 | |
0.9% | 3.1% | |
0.0 | 1.8 | |
11 months ago | almost 3 years ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fengari
-
Lua: The Little Language That Could
it should be possible, the article mentions https://fengari.io/ (a Lua VM written in JavaScript)
-
PyScript
Other languages have done that :)
Lua in the browser: https://fengari.io/
And then you can use that to run Fennel, a Lisp that compiles to Lua https://fennel-lang.org/
I think TypeScript also has a script you can include that lets you put your TS code in a special script tag, and it gets compiled in-browser.
-
Upcoming interview with Roberto Ierusalimschy
Please stop this stuck in the mud nonsense. Anyone stumbling upon lua.org might think the project is dead already. The material is great, close to the best, but its presentation is pure shite. Not mobile friendly (what kinds of device do you think the majority of people in the Global South use?). We live in a world of code highlighting, none of that in PiL. We live in a world where Fengari allows Lua to run in the browser, does that make an appearance on lua.org, allowing users to immediately play with the language? Of course not! It's almost as if the Lua team is trying to push away potential users.
-
Hacker News top posts: Feb 20, 2022
Fengari – Lua for the Browser\ (57 comments)
-
Fengari – Lua for the Browser
Lua 5.3’s not really a fork. It just has backwards-incompatible changes, as do 5.1, 5.2 and 5.4.
Otherwise yes, “Fengari implements Lua 5.3”. https://github.com/fengari-lua/fengari
-
Move over JavaScript: Back-end languages are coming to the front-end
Please note, my original comment was simply correcting the notion that JS is popular because it was especially well suited for working on the web. I see projects like Fengari[1] and would _love_ to use something like that but I recognize I can't impose an extra 300kb on end users just because I want to write in a more pleasant language to develop. I accept that JS is what we have, but I won't pretend like JS was the cream that rose to the top.
[1]: https://fengari.io/
-
How I coded my way to victory in World of Warcraft
WoW's UI API is written in Lua. If you aren't familiar, Lua is a great little scripting language built on top of C, designed to be embedded into larger pieces of software. You can even, thanks to web assembly, run it in the browser. It has some quirks that take some getting used to (Lua's Arrays start at index 1 👀), but by and large it's great at what it does and can be found everywhere in computer game UIs.
- Lua: Good, Bad, and Ugly Parts
-
CPython's main branch running in the browser with WebAssembly
> I’d expect MicroPython (or Lua/mruby/etc) could be an order of magnitude smaller. Still larger (and slower) than just using JavaScript, though.
Fengari [0], a Lua interpreter written in JS, is a little over 200Kb. (And was intentionally written in JS [1] because of a variety of reasons that made WASM not work that well.
200Kb isn't that bad of a price to pay to switch languages, on most websites. It'll be about the cost of a single image added to the page. And it's fairly performant.
For most sites, the costs in terms of requests and performance will be negligible compared to what you're trying to achieve.
And Fengari makes it nice and easy to interact with JS, too. Using React with Lua's syntax was what sold me on it. No ecosystem lockout, like I'd expect with most WASM ports.
[1] https://hackernoon.com/why-we-rewrote-lua-in-js-a66529a8278d
fengari-web
-
Fengari question
If you're using it on the client-side, fengari-web is what you probably want. If you want to run it in node.js, then you only need fengari.
What are some alternatives?
pypyjs - PyPy compiled to JavaScript
pyodide - Pyodide is a Python distribution for the browser and Node.js based on WebAssembly
emscripten - Emscripten: An LLVM-to-WebAssembly Compiler
lunatic - Lunatic is an Erlang-inspired runtime for WebAssembly
lua-cmake - Embed lua with CMake
wasm-libxml2 - A quick experiment to build and run libxml2 as a WebAssembly module.
weird-wide-webring - The web needs a little more weird. These sites are helping. Apply to join!
love-typescript-definitions - Write LÖVE 2D projects with TypeScript
luau - A fast, small, safe, gradually typed embeddable scripting language derived from Lua
asm-dom - A minimal WebAssembly virtual DOM to build C++ SPA (Single page applications)
tl - The compiler for Teal, a typed dialect of Lua
webassembly-lua - Write and compile WebAssembly code with Lua