logoalt Hacker News

Fabrice Bellard Releases MicroQuickJS

1117 pointsby Aissenyesterday at 5:33 PM422 commentsview on HN

Comments

antirezyesterday at 7:49 PM

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.

show 19 replies
pizlonatoryesterday at 6:41 PM

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

show 2 replies
simonwyesterday at 9:35 PM

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).

show 3 replies
ea016yesterday at 7:20 PM

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

[0] https://en.wikipedia.org/wiki/Jeff_Atwood

show 3 replies
simonwyesterday at 6:19 PM

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/

show 1 reply
timschumiyesterday at 5:52 PM

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.

show 2 replies
forestoyesterday at 7:52 PM

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.)

show 4 replies
bmc7505today at 12:37 AM

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.

[1]: https://github.com/SamGinzburg/VectorVisor

[2]: https://github.com/beehive-lab/ProtonVM

MattGrommesyesterday at 6:29 PM

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?

show 2 replies
chunklesyesterday at 6:37 PM

Timing really is everything for making the frontpage, I posted this last night and it got no traction.

theandrewbaileyyesterday at 10:18 PM

> 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?

show 1 reply
Reubendyesterday at 6:51 PM

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.

ddtayloryesterday at 6:45 PM

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.

show 5 replies
baudauxyesterday at 5:50 PM

I easily managed to build quickJS to WebAssembly for running in https://exaequOS.com . So I need to do the same for MicroQuickJS !

booiyesterday at 5:52 PM

If there were a software engineering hall of fame, I nominate Fabrice.

show 6 replies
aidduntoday at 8:27 AM

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?

show 1 reply
noduermetoday at 7:25 AM

>> Arrays cannot have holes. Writing an element after the end is not allowed:

    a = []
    a[0] = 1; // OK to extend the array length
    a[10] = 2; // TypeError
If you need an array like object with holes, use a normal object instead

Guess 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)?

mtlynchyesterday at 7:45 PM

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.

show 3 replies
yeaskuyesterday at 10:11 PM

I wonder if AI is so good why dont we have this kind of software released by people here who yap about it.

zamadatixyesterday at 6:12 PM

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?

show 2 replies
eichinyesterday at 7:18 PM

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.)

jgrizouyesterday at 11:55 PM

What is the difference with https://www.espruino.com/ ?

show 1 reply
notorandityesterday at 8:10 PM

This guy is incredible. Lzexe, Qemu, TinyCC to name just a few gems.

alcoveryesterday at 5:58 PM

I wish for this new year we reboot the Web with a super light standard and accompanying ecosystem with

    - 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
That would make my year.
show 14 replies
schappimyesterday at 7:45 PM

Love it! Needing only 10K of RAM, it looks like a much better solution to CircuitPython (can squeeze into 32K).

mrmagoo17today at 12:08 AM

This is a hell of a Christmas present, Mr. Santa Bellard!

p0w3n3dyesterday at 7:50 PM

I wonder when does he have time to do those marvellous things

rcarmotoday at 10:06 AM

Now all we need is a Fennel-like LISP on top.

dangoodmanUTyesterday at 8:30 PM

this would be a killer replacement for micro/circuitpython for embedded devices, assuming there's an elegant TS->MQJS transpile

show 3 replies
anita_yesterday at 9:59 PM

[dead]

T3RMINATEDyesterday at 6:21 PM

[dead]

jumbledooryesterday at 11:30 PM

[dead]

diimdeepyesterday at 7:51 PM

I find frustrating that imagination of very smart, talented and capable people is captured by JavaScript language, surely they could have done better.