Skip to main content

One post tagged with "Electron"

Electron —— A cross-platform desktop apps with JavaScript, HTML, and CSS

View All Tags

在 Electron 项目中调用原生API

· 2 min read
yinpo
Owner and Maintainer of here

本质上 Electron 调用原生 API 的逻辑就是 Node 环境对原生 API 的调用,与 Electron 没有根本上的联系,Electron 只是提供了运行 Nodejs 的环境,并没有引入特殊机制。

所以问题可以简化为如何在 Nodejs 环境中调用原生 API。这里探索两种方案:

  1. WebAssembly
  2. Node Addons