- If this had been available in 2010, Redis scripting would have been JavaScript and not Lua. Lua was chosen based on the implementation requirements, not on the language ones... (small, fast, ANSI-C). I appreciate certain ideas in Lua, and people love it, but I was never able to like Lua, because it departs from a more Algol-like syntax and semantics without good reasons, for my taste. This creates friction for newcomers. I love friction when it opens new useful ideas and abstractions that are worth it, if you learn SmallTalk or FORTH and for some time you are lost, it's part of how the languages are different. But I think for Lua this is not true enough: it feels like it departs from what people know without good reasons.
- This engine restricts JS in all of the ways I wished I could restrict the language back when I was working on JSC.
You can’t restrict JS that way on the web because of compatibility. But I totally buy that restricting it this way for embedded systems will result in something that sparks joy
- Clarification added later: One of my key interests at the moment is finding ways to run untrusted code from users (or generated by LLMs) in a robust sandbox from a Python application. MicroQuickJS looked like a very strong contender on that front, so I fired up Claude Code to try that out and build some prototypes.
I had Claude Code for web figure out how to run this in a bunch of different ways this morning - I have working prototypes of calling it as a Python FFI library (via ctypes), as a Python compiled module and compiled to WebAssembly and called from Deno and Node.js and Pyodide and Wasmtime https://github.com/simonw/research/blob/main/mquickjs-sandbo...
PR and prompt I used here: https://github.com/simonw/research/pull/50 - using this pattern: https://simonwillison.net/2025/Nov/6/async-code-research/
- If anyone wants to try out MicroQuickJS in a browser here's a simple playground interface for executing a WebAssembly compiled version of it: https://tools.simonwillison.net/microquickjs
It's a variant of my QuickJS playground here: https://tools.simonwillison.net/quickjs
The QuickJS page loads 2.28 MB (675 KB transferred). The MicroQuickJS one loads 303 KB (120 KB transferred).
- Well, as Jeff Atwood famously said [0], "any application that can be written in JavaScript, will eventually be written in JavaScript". I guess that applies to embedded systems too
- Not sure about the impact of these, I guess it depends on the context where this engine is used. But there seems to be already exploits for the engine:
- It's unfortunate that he uploaded this without notable commit history, it would be interesting to see how long it takes a programmer of his caliber to bring up a project like this.
That said, judging by the license file this was based on QuickJS anyway, making it a moot comparison.
- I wonder if this could become the most lightweight way for yt-dlp to solve YouTube Javascript challenges.
https://github.com/yt-dlp/yt-dlp/wiki/EJS
(Note that Bellard's QuickJS is already a supported option.)
- Fabrice, Mr Bellard, O Indefatigable One, if you are reading this, I would love for you to make a JavaScript that compiles to assembly and works across Windows PE, macOS and Linux. Surrendering the various efficiencies of the V8 JIT bytecode in favor of AOT is entirely acceptable for the concision, speed and the chance to "begin again" that this affords. In fact, I believe you may already be working on such an idea! If you are not (highly doubtful) I encourage you to ponder it, and if we are so lucky and the universe wills it, you shall turn the hand of your incomparable craftsmanship upon this worthy goal, and doubtless such a magnificent creation shall be realized by you in a surprisingly short amount of time!
- Interesting. I wonder if mqjs would make it feasible to massively parallelize JavaScript on the GPU. I’m looking for a way to run thousands of simultaneous JS interpreters, each with an isolated heap and some shared memory. There are some research projects [1, 2] in this direction, but they are fairly experimental.
- I'm not an embedded systems guy (besides using esp32 boards) so this might be a dumb question but does something like this open up the possibility of programming an esp32/arduino board with Javascript, like Micro/Circuit Python?
- As a fellow (but way junior) JavaScript engine developer I'm really happy to see the stricter mode, and especially Arrays being dense while Objects don't treat indexed properties specially at all: it is my opinion that this is where we should drive JavaScript towards, slow and careful though it may be.
In my engine Arrays are always dense from a memory perspective and Objects don't special case indexes, so we're on the same page in that sense. I haven't gotten around to creating the "no holes" version of Array semantics yet, and now that we have an existing version of it I believe I'll fully copy out Bellard's semantics: I personally mildly disagree with throwing errors on over-indexing since it doesn't align with TypedArrays, but I'd rather copy an existing semantic than make a nearly identical but slightly different semantic of my own.
- Timing really is everything for making the frontpage, I posted this last night and it got no traction.
- When reading through the projects list of JS restrictions for "stricter" mode, I was expecting to see that it would limit many different JS concepts. But in fact none of the things which are impossible in this subset are things I would do in the course of normal programming anyway. I think all of the JS code I've written over the past few years would work out of the box here.
- Fabrice Bellard is widely considered one of the most productive and versatile programmers alive:
- FFmpeg: https://bellard.org
- QEMU: https://bellard.org/qemu/
- JSLinux: https://bellard.org/jslinux/
- TCC: https://bellard.org/tcc/
- QuickJS: https://bellard.org/quickjs/
Legendary.
- I easily managed to build quickJS to WebAssembly for running in https://exaequOS.com . So I need to do the same for MicroQuickJS !
- > It compiles and runs Javascript programs with as low as 10 kB of RAM.
Just in time for RAM to become super expensive. How easy would it be to shove this into Chromium and Electron?
- As a long-time Espruino user I was immediately interested.
At first glance Espruino has broader coverage including quite a bit of ES6 and even up to parts of ES2020. (https://www.espruino.com/Features). And obviously has a ton of libraries and support for a wide range of hardware.
For a laugh, and to further annoy the people annoyed by @simonw's experiments, I got Cursor to butcher it and run as a REPL on an ESP32-S3 over USB-Serial using ESP-IDF.
Blink is now running so my work here is done :-)
led.init(48) function blink() { led.rgb(0, 0, 255) setTimeout(function() { led.off(); setTimeout(blink, 500) }, 500) } blink() - I wonder what "hurr durr gotos are bad" crowd would say. Anyone?
- If there were a software engineering hall of fame, I nominate Fabrice.
- Glad to see a project of Fabrice Bellard on github, finally. I know many great opensource projects exist without public development (notably, sqlite), but is always disappointing to have no public bug tracker, no patch submission, no commit history, contact by email, tarballs (even with a signature, tooling for signed downloads never received any development), etc.
- People talk about how productive Fabrice Bellard is, but I don't think anyone appreciates just how productive he is.
Here's the commit history for this project
b700a4d (2025-12-22T1420) - Creates an empty project with an MIT license
295a36b (2025-12-22T1432) - Implements the JavaScript engine, the C API, the REPL, and all documentation
He went from zero to a complete JS implementation in just 12 minutes!
I couldn't do that even if you gave me twice as much time.
Okay, but seriously, this is super cool, and I continue to be amazed by Fabrice. I honestly do think it would be interesting to do an analysis of a day or week of Fabrice's commits to see if there's something about his approach that others can apply besides just being a hardworking genius.
- Anyone know how this compares to Espruino? The target memory footprint is in the same range, at least. (I know very little about the embedded js space, I just use shellyplugs and have them programmed to talk to BLE lightswitches using some really basic Espruino Javascript.)
- I wonder if AI is so good why dont we have this kind of software released by people here who yap about it.
- Just published a rust wrapper if anyone plan on embedding it like I do:
- What is the difference with https://www.espruino.com/ ?
- >> Arrays cannot have holes. Writing an element after the end is not allowed:
If you need an array like object with holes, use a normal object insteada = [] a[0] = 1; // OK to extend the array length a[10] = 2; // TypeErrorGuess I'm a bit fuzzy on this, I wouldn't use numeric keys to populate a "sparse array", but why would it be a problem to just treat it as an iterable with missing values undefined? Something to do with how memory is being reserved in C...? If someone jumps from defining arr[0] to arr[3] why not just reserve 1 and 2 and inform that there's a memory penalty (ie that you don't get the benefit of sparseness)?
- Is there a static analyzer/linter associated with this environment that can flag potential runtime issues upfront?
- On a phone at the moment so I can't try it out, but in regards to this "stricter mode" it says global variables must be declared with var. I can't tell if that means that's just the only way to declare a global or if not declaring var makes it scoped in this mode. Based on not finding anything skimming through the examples, I assume the former?
- Sound like this would have been a good option for PLJS in PostgreSQL (currently using QuickJS), not sure if it'd be appropriate to consider a switch or if that would/could improve availability... IMO interaction with JSON(B) and other json and objects being the biggest usefulness.
- Love it! Needing only 10K of RAM, it looks like a much better solution to CircuitPython (can squeeze into 32K).
- I wish for this new year we reboot the Web with a super light standard and accompanying ecosystem with
That would make my year.- A small and efficient JS subset, HTML, CSS - A family of very simple browsers that do just that - A new Web that adheres to the above - This guy is incredible. Lzexe, Qemu, TinyCC to name just a few gems.
- bellard is basically proof that the "10x engineer" exists. ffmpeg, qemu, quickjs, and now this... all from one person. the fact that he can optimize a js engine down to 10kb of ram is wild. would love to see this on esp32 boards
- Looks like the real "JavaScript: The Good Parts"
- Very excited about this. I was programming an ESP32 for a project recently and was like, computer chips are fast enough, why can't I just write TypeScript?
- Sounds like a competitor for Micropython on all those little RP2350 and ESP boards.
- This is a hell of a Christmas present, Mr. Santa Bellard!
- I wonder when does he have time to do those marvellous things
- how anyone explore extending the stdlib for hardware specific features?
- this would be a killer replacement for micro/circuitpython for embedded devices, assuming there's an elegant TS->MQJS transpile
- It gives me strong ffserver flashbacks.
- Now all we need is a Fennel-like LISP on top.
- I find frustrating that imagination of very smart, talented and capable people is captured by JavaScript language, surely they could have done better.
- Feel free to check out this MicroQickJS WASM port (100% Claude Code generated)