r/javascript • • Jan 13 '16

Microsoft open-sources ChakraCore JavaScript engine (powers Microsoft Edge)

https://github.com/Microsoft/ChakraCore
337 Upvotes

106 comments sorted by

View all comments

94

u/bterlson_ @bterlson Jan 13 '16

If anyone has any questions, I and many members of the Chakra team are around today!

40

u/i_ate_god Jan 13 '16

Is the post-Ballmer microsoft really as good as it seems superficially or this just a new take on the embrace-extend-extinguish mantra?

56

u/bterlson_ @bterlson Jan 13 '16

I can't speak for the company, but I can give you my perspective. Our team is really excited to finally be OSS and work with the community to make Chakra and JS in general more awesome. Nothing nefarious that I can see. Plus, MIT license!

24

u/jadbox Jan 13 '16

Congrats on getting it under MIT #notyourfathersMS

→ More replies (8)
→ More replies (5)
→ More replies (1)

8

u/Mittalmailbox Jan 13 '16

Any plans of node with chakra?

19

u/bterlson_ @bterlson Jan 13 '16

Oh yeah! You can see some info on our roadmap. Also, check out https://github.com/microsoft/node - we're working on making Chakra an option with Node!

6

u/jewdai Jan 14 '16

why would I want to use chakra over v8?

13

u/[deleted] Jan 14 '16

It's more about abstracting Node from the underlying V8 engine. Then you can use whatever underlying engine you want (maybe one that works better on different architectures, etc).

8

u/xbudex Jan 14 '16

I'm pretty sure Chakra supports asm.js. It should be possible to use any language supported by llvm without paying a performance hit of calling a native library. Imagine using something like sqlite as pure JavaScript at near native speed.

6

u/anlumo Jan 14 '16

Better ES6 support I'd guess.

5

u/I_Downvote_Cunts Jan 13 '16

Here you go https://github.com/Microsoft/node. I would love to see what the performance comparison to v8 is.

11

u/dilijev Chakra Developer Jan 13 '16

That's part of why we're really excited by this effort. It will be a big real-world scenario we can use to see how we stack up and hopefully will help guide future improvements.

→ More replies (1)

8

u/talmobi Jan 13 '16

I assume you've extensively looked at V8 and SpiderMonkey. How would you say Chakra differs? Better documentation? Faster in X? Slower in Y? Overall pros cons? Thank you.

10

u/bterlson_ @bterlson Jan 13 '16

Many differences of course, but whether they matter (or are better or worse) depends on what your requirements are. Performance is better in many aspects. Great language support (most of ES6, bunch of ES7). JSRT APIs are pretty nice as well. If you've got something more specific in mind I could talk to it.

4

u/talmobi Jan 13 '16

What are the implementation of arrays in Chakra and their use cases? Does the implementation differ significantly from the others?

10

u/bterlson_ @bterlson Jan 13 '16

Oh man this is actually a huge area. Arrays are extremely commonly used and also very perf sensitive so we have many representations and optimizations in play. Hard to describe concisely. Maybe a good topic for a blog? That said I would bet given that all the runtimes have similar constraints we all use similar representations and optimizations.

→ More replies (1)

6

u/brandf Jan 14 '16

Having used V8, JSC, and Chakra to power our app on various platforms, I'd like to call out Chakra as being both easy to integrate into your app (particularly using WinRT class bindings), and easy to debug (unlike v8 which requires jumping through hoops if you're not chromium).

Good work guys! Glad to see it open sourced.

→ More replies (4)

21

u/Klathmon Jan 13 '16

Congrats! I know open sourcing a large codebase like this takes a lot of work (and a lot of bureaucracy!)

Hopefully this lights a fire under the V8 team's ass and we can get a good 'ole rivalry going here!

11

u/bterlson_ @bterlson Jan 13 '16

So much work!! Wish it was like flipping a switch :) Also the work continues, as I imagine we'll have much to learn about working in the open.

6

u/sime Jan 13 '16

We all know that MS is pushing hard to get people to upgrade to Windows 10 and Edge, but is there any chance that we will see a softening of this stance and maybe Edge running on Windows 7? In other words, how can we get IE11 out of the world faster?

→ More replies (2)

7

u/wreckedadvent Yavascript Jan 13 '16

I've heard various bits and pieces from Chakra about ASM but nothing about Web Assembly. What are the plans, if any, for it?

16

u/bterlson_ @bterlson Jan 13 '16

We're working on it! There is some early work in a pull request. There's a bit of info on the roadmap too.

0

u/[deleted] Jan 13 '16

[deleted]

21

u/dilijev Chakra Developer Jan 13 '16

Hi! Chakra engineer here. That decision arose from a community request when we announced at JSConf that we would open our sources. The request was that we provide an option to build ChakraCore without the JIT pieces which would make it easier to embed in certain types of applications, or to reuse certain parts of the code (parser, interpreter) more easily. Since the JIT is one of the most platform-specific pieces (we need to produce assembly), it made sense to make our near-term cross platform goal not include JIT for now. That will get a large part of the code base on more platforms more quickly.

That's not to say there will never be JIT on Linux. The cross-platform effort is work in progress and we'll see how it goes. :)

→ More replies (2)
→ More replies (1)
→ More replies (1)
→ More replies (31)