Re:Recent efforts in V8 and DevTools for Node.js
by piscisaureus on Friday December 16, 2016 @08:37AM
(#13193107)
On your remark on the enbedder api: work is underway to define an engine agnostic C api for node.js compiled addons.
See https://github.com/nodejs/vm
Re:Recent efforts in V8 and DevTools for Node.js
by jcoffland on Friday December 16, 2016 @09:25PM
(#13198791)
That would be great. You should work with the Chakra guys. I've created a engine agnostic API for C++ here: https://github.com/CauldronDevelopmentLLC/cbang/tree/master/... It currently works with v8 and Chakra.
One of the key advantages of my API is that by using a "sink" interface it can be very efficient because the implementation calls the engine's API directly with out creating intermediate data. As I mentioned this is in C++ but it could easily be translated into a C API.
Let me know if you would like help with this.
The second biggest improvement would be to simplify the API. Using Contexts, Isolates, HandleScopes, etc. is complicated and causes the code to crash in unpredictable ways when you get it wrong. The API was built with Chrome's internals in mind and this shows.