C++ 嵌入器 API


【C++ embedder API】

Node.js 提供了许多 C++ API,可以在其他 C++ 软件中用于在 Node.js 环境中执行 JavaScript。

【Node.js provides a number of C++ APIs that can be used to execute JavaScript in a Node.js environment from other C++ software.】

这些 API 的文档可以在 Node.js 源代码树中的 src/node.h 中找到。除了 Node.js 暴露的 API 外,一些必要的概念还由 V8 嵌入器 API 提供。

【The documentation for these APIs can be found in src/node.h in the Node.js source tree. In addition to the APIs exposed by Node.js, some required concepts are provided by the V8 embedder API.】

因为将 Node.js 用作嵌入式库与编写由 Node.js 执行的代码不同,破坏性更改不会遵循典型的 Node.js 弃用政策,并且可能在每个语义化版本(semver)主版本发布时发生,而不会提前警告。

【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.】