That'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.
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?
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.
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/chakrashi...