C++ 嵌入器


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

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

因为使用 Node.js 作为嵌入式库与编写由 Node.js 执行的代码不同,破坏性更改不遵循典型的 Node.js 弃用策略,并且可能在每个语义化主版本上发生,而没有事先警告.

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

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.

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.