Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeusdeux/c-node-native-addon-example
Simple Node.js native addon written in C
https://github.com/zeusdeux/c-node-native-addon-example
Last synced: 13 days ago
JSON representation
Simple Node.js native addon written in C
- Host: GitHub
- URL: https://github.com/zeusdeux/c-node-native-addon-example
- Owner: zeusdeux
- License: mit
- Created: 2024-02-09T20:33:51.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-07T16:58:52.000Z (6 months ago)
- Last Synced: 2024-10-16T19:25:09.881Z (27 days ago)
- Language: C
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# C based Node.js native addon
Teaching myself how to write native addons for Node.js in C.
> je ne parle pas C++ ¯\\\_(ツ)\_/¯
To use the exported function, do &emdash;
```bash
pnpm build &>/dev/null && node -e 'console.log("Value returned from addon:", require("./addon").hello())'
```## Learnings
- The `target_name` in `binding.gyp` is what is passed to `bindings(...)` in `/addon.js`