C++ 嵌入器 API


¥C++ embedder API

Node.js 提供了许多 C++ API,可用于在 Node.js 环境中从其他 C++ 软件执行 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 弃用政策,并且可能会在每个语义化版本主要版本中发生,而不会事先触发警告。

¥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.