api icon indicating copy to clipboard operation
api copied to clipboard

Add Features: C++ interface

Open yuej-jin opened this issue 9 years ago • 1 comments

I see that ianwjhalliday/node.git is doing the work for C API. we are also working on the project to add a C++ vm independent interface for v8 native api.

We may want to add these feature to native api:

  1. C++ interface. the interface is like C but wraps the data and methods together. It may be looks like v8 api but more clear and easy to use, and will be vm independent.
  2. independent of vm to develop and compile (Maybe not the new feature?) We plan to use env pointer to wrap the API function pointer and separate the interface and internal implementation.
  3. Native module load mechanism, independent of node-addons. Since this interface will be vm-neutral, I think it may be better to use a load mechanism different from node-addon.

We have done some work now: https://github.com/alibaba/node (branch jsni-v1.0). There are a few of test cases under node/deps/jsni/. The work is not all completed yet, there may be some deficiencies。But we want to do something to promote the project of the vm-neutral native API.

Any ideas and suggestions?

yuej-jin avatar Sep 23 '16 11:09 yuej-jin

The work being done by ianwjhalliday is a group effort and has now moved to nodes/abi-stable-node. The direction/motivation is covered in: https://github.com/nodejs/node-eps/pull/20.

I'd suggest you join this work. We already have the nan-addon-examples running as well as a couple of larger modules running.

I've not had time to look at your project but what we are heading towards is C API exported from Node.js, with inlined only C++ sugar that can make it easier to use.

We have weekly meetings at Tuesday 5EST. If you'd like to get involved then maybe you can make the next meeting or we can try to schedule a time that would be better.

mhdawson avatar Sep 26 '16 19:09 mhdawson