4 ms·
You're comparing apples and oranges here. Rendering engines (all in C++ except Servo): - Servo - Blink (Chrome/Opera) - Trident/Spartan (IE/Edge) - Webkit
by Manishearth 11y ago
You're comparing apples and oranges here.
Rendering engines (all in C++ except Servo):
- Servo
- Blink (Chrome/Opera)
- Trident/Spartan (IE/Edge)
- Webkit (Safari)
JS engines:
- Spidermonkey (used by Servo and Firefox)
- Chakra (used by Trident/Edge)
- V8 (used by Blink, also by Node)
Servo already uses a JS engine in C++ because a Rust JS engine is a huge undertaking in itself (see [1])
It does make sense to try out Chakra or V8 for Servo. It's probably a lot of work, though. And there may not be a net gain out of that (We have access to in-house spidermonkey know-how, none of that for the others).
[1]: https://news.ycombinator.com/item?id=10682274 https://news.ycombinator.com/item?id=10682274
- nly 11y agoMy bad, I meant JavascriptCore or the JS engines often paired with WebKit. What I meant was, why pair Servo with Chakra and not any of the other Javascript engines?
- apaprocki 11y agoI have a vested interest in creating a SM -> Chakra adapter to swap out SpiderMonkey and be able to compare it to see how it does because Chakra is also an interpreter and not JIT-only like V8. Such an adapter would also make playing with Servo -> Chakra possible. I haven't play with Servo, but is there a list of all the JSAPI calls that it needs to function or can you easily dump that list?
- Natanael_L 11y agohttps://news.ycombinator.com/item?id=10682291 https://news.ycombinator.com/item?id=10682291 this?
- Manishearth 11y agoYep. See also: https://github.com/servo/rust-mozjs https://github.com/servo/rust-mozjs
- Manishearth 11y agoThe comments below link to the bindings (rust-mozjs is the Rust API, but the parts of it we use are in components/script/dom/bindings). Here's a `git grep jsapi` on that folder: https://manishearth.pastebin.mozilla.org/8853940 https://manishearth.pastebin.mozilla.org/8853940. Haven't removed duplicates or formatted it, so it's probably much shorter than it looks. Please keep me posted about this!
- seba_dos1 11y agoWebkit uses JavaScriptCore, not V8.
- Manishearth 11y agoTIL; fixed, thanks.