Sounds like a lot of work (not to say it's not possible or interesting). Our bindings code is pretty complicated already. It depends highly on how Chakra deals with things internally -- if it's similar to SpiderMonkey; I'd be interested in having a look. Might become a fun project :)
Without a reference open source DOM implementation (which we have for SM -- Firefox's DOM), we'd also need good docs for the Chakra API. No idea if that exists.
(I'm guessing this would be at least the milionth time they hear about it :) )
I think the person who wrote this particular page simply didn't specify a friendly name, which is why it's falling back to the canonical name.
Will have a look and compare with the spidermonkey bindings when I get time.
Rendering engines (all in C++ except Servo):
- Blink (Chrome/Opera)
- Trident/Spartan (IE/Edge)
- Webkit (Safari)
- 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 )
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).
Here's a `git grep jsapi` on that folder: 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!
Stuff like JITs can't really reap Rust's safety+performance benefits, and overall the same might be said of a JS interpreter, with all the garbage collection and stuff. The other thing is that Spidermonkey/Chakra/V8 have had years of optimization and tweaks, starting from a clean slate would be _very_ hard. With Servo's small team this is an impossible task, but with a larger, dedicated, team, there's a chance. shrugs
: though it's possible they will still be safer than the C++ counterparts, which is still good. The question then becomes, how much is that increase in safety, and can it justify a whole rewrite?