Linking to libraries included with Node.js for additional information.Īll of the following examples are available for download and mayīe used as the starting-point for an addon. Re-exported by Node.js and may be used to various extents by addons. Only the libuv, OpenSSL, V8, and zlib symbols are purposefully Other libraries are located in the deps/ directory in the Node.js source Node.js includes other statically linked libraries including OpenSSL. Use, the most important of which is the node::ObjectWrap class. Node.js itself exports C++ APIs that addons can Offloading work via libuv to non-blocking system operations, worker threads, Addon authors shouldĪvoid blocking the event loop with I/O or other time-intensive tasks by More sophisticated asynchronous addons that need to move beyond the libuvĪlso provides a threading abstraction similar to POSIX threads for Serves as a cross-platform abstraction library, giving easy, POSIX-likeĪccess across all major operating systems to many common system tasks, suchĪs interacting with the file system, sockets, timers, and system events. Threads and all of the asynchronous behaviors of the platform. Libuv: The C library that implements the Node.js event loop, its worker V8.h header file ( deps/v8/include/v8.h in the Node.js source V8 provides the mechanisms for creating objects,Ĭalling functions, etc. V8: the C++ library Node.js uses to provide the Involving knowledge of several components and APIs: When not using Node-API, implementing addons is complicated, Refer to C/C++ addons with Node-API for more information on Unless there is a need forĭirect access to functionality which is not exposed by Node-API, use Node-API. Use of internal V8, libuv, and Node.js libraries. There are three options for implementing addons: Node-API, nan, or direct Require() function can load addons as ordinary Node.js modules.Īddons provide an interface between JavaScript and C/C++ libraries. Addons are dynamically-linked shared objects written in C++.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |