Node.js v18.12.1 documentation


Table of contents

C++ embedder APIC++嵌入程序API#

Node.js provides a number of C++ APIs that can be used to execute JavaScript in a Node.js environment from other C++ software.Node.js提供了许多C++API,可用于在其他C++软件的Node.js环境中执行JavaScript。

The documentation for these APIs can be found in src/node.h in the Node.js source tree. 这些API的文档可以在Node.js源代码树的src/node.h中找到。In addition to the APIs exposed by Node.js, some required concepts are provided by the V8 embedder API.除了Node.js公开的API之外,V8嵌入式API还提供了一些必需的概念。

Because using Node.js as an embedded library is different from writing code that is executed by Node.js, breaking changes do not follow typical Node.js deprecation policy and may occur on each semver-major release without prior warning.因为使用Node.js作为嵌入式库与编写由Node.js执行的代码不同,所以破坏性更改不遵循典型的Node.js弃用策略,并且可能在没有事先警告的情况下发生在每个semver主要版本上。