Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/wapython
Path: blob/main/core/posix-node/src/c.zig
1067 views
1
// posix-node binaries should work across a very wide range of nodejs versions
2
// for their given architecture.
3
//
4
// "For an addon to remain ABI-compatible across Node.js major versions, it must use
5
// Node-API exclusively by restricting itself to using #include <node_api.h>."
6
//
7
// -- https://nodejs.org/api/n-api.html
8
//
9
// TODO: In https://nodejs.org/api/n-api.html#usage they explain that we can do something
10
// like "#define NAPI_VERSION 3" to ensure our code all works with a specific range
11
// of nodejs versions.
12
13
pub usingnamespace @cImport({
14
@cInclude("node_api.h");
15
@cInclude("stdlib.h");
16
});
17
18