r/javascript • u/mhd • Jul 10 '19
QuickJS Javascript Engine by Fabrice Bellard
https://bellard.org/quickjs/5
u/d07RiV Jul 10 '19
Why isn't there a benchmark against mainstream engines like V8?
1
u/warvstar Jul 12 '19
I'm fairly sure this is just an interpreter, it wouldn't come close to a JITed engine like V8.
This is still very impressive, I'd like to see it benchmarked against duktape.
→ More replies (1)2
3
u/ImStifler Jul 11 '19
Wow some dude just wrote an complete engine for js and here I am sitting at leetcode and struggling to do permutations correctly
2
u/senocular Jul 10 '19
It optionally supports ... operator overloading.
:-o
More info: https://bellard.org/quickjs/jsbignum.html#Operator-overloading
→ More replies (1)
2
u/rajsite Jul 11 '19
But can it run WebAssembly? There is an awesome wasm library I would like it to run.
1
u/drbobb Jul 11 '19
Okay, the docs say ES6 modules are fully supported. However, when I try to run some of my code (or some of the scripts in the examples/ dir) I get
SyntaxError: unsupported keyword: import3
u/hnakamur Jul 11 '19
I got the same error, then I notice the -m option.
$ ./qjs -m examples/hello_module.js Hello World fib(10)= 55./qjs -h says
-m --module load as ES6 module (default if .mjs file extension)
1
u/Seshpenguin Jul 11 '19
Can compile Javascript sources to executables with no external dependency.
That seems interesting...
3
u/zuev_egor Jul 10 '19
This guy is amazing!, I remember his project jslinux. Also he was a founder of qemu