Hacker News new | ask | show | jobs
by Matthias247 3811 days ago
Just 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?
1 comments

For 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.