3 ms·
Ironically Microsoft had to create a V8 C++ API facade over Chakra in order for Node to compile with it. https://github.com/Microsoft/node/tree/chnext/deps/cha
by morebetterer 11y ago
Ironically Microsoft had to create a V8 C++ API facade over Chakra in order for Node to compile with it.
https://github.com/Microsoft/node/tree/chnext/deps/chakrashim https://github.com/Microsoft/node/tree/chnext/deps/chakrashi...
It's interesting that the license of the Chakra shim is the V8 license:
https://github.com/Microsoft/node/blob/chnext/deps/chakrashim/include/v8.h https://github.com/Microsoft/node/blob/chnext/deps/chakrashi...
- ksp4186 11y agoThat's correct. V8 license is required in v8-*.h files because they are v8 header files that chakra shim uses. The implementation files has Microsoft license. E.g. All files in https://github.com/Microsoft/node/tree/chnext/deps/chakrashim/src https://github.com/Microsoft/node/tree/chnext/deps/chakrashi... Disclaimer: I work for Chakra team (powering node.js)
- morebetterer 11y agoAny progress in talks with Node.JS to make an implementation independent JS engine API for node?
- ksp4186 11y agoIts a long goal as of now that everyone want to achieve. You can follow this discussion at https://github.com/nodejs/nan/issues/349 https://github.com/nodejs/nan/issues/349
- morebetterer 11y agoThat thread doesn't show a lot of promise towards an engine neutral API.
- ksp4186 11y agoTrue. I think it will pick up once Node.js + Chakracore (or other Javascript Engines) starts taking momentum.
- morebetterer 11y agoI see Chakra has caught to up Dec 30, 2015 with the nodejs tree. Which branch are you basing the fork against?
- ksp4186 11y agoWe are basing it off nodejs/master - https://github.com/nodejs/node https://github.com/nodejs/node
- Matthias247 11y agoJust curious: If I would like to write a native extension for a possible Chakra powered node.js, which methods would then be possible? - Use V8 C++ API - Use Chakra extension API - Use NAN - All of those? And in your port are Nodes inbuilt native functions (like the libuv based IO functions) still using V8 APIs which are mapped to Chakra by this shim or are they reimplemented directly on top of Chakra APIs?
- ksp4186 11y agoFor native modules, below options are ideal: - V8 C++ API : These APIs will continue to work with node.js v8 as well as with Chakra because in shim layer we map them to equivalent Chakra APIs. If you see problem in any APIs not working as expected using Chakra engine, please file an issue on Microsoft/node and we will happy to fix it. - NAN : Node.js Chakra is compatible with latest NAN version so it should continue to work with V8 and Chakra engine. Regarding, Node inbuilt native functions (in other works deps) that are independent of v8, continue to work in Chakra without reimplementation. Chakra shim comes into picture to map V8 C++ APIs to Chakra equivalent.
- oldmanjay 11y agoYou disclose facts you wish people to consider. You disclaim things when you want them to not be considered. Sorry, it's my pet peeve. Downvote at will