https://github.com/datkt/napi
N-API C Interop for Kotlin/Native
https://github.com/datkt/napi
binding c cinterop interop kotlin kotlin-native n-api napi native node
Last synced: about 1 month ago
JSON representation
N-API C Interop for Kotlin/Native
- Host: GitHub
- URL: https://github.com/datkt/napi
- Owner: datkt
- License: mit
- Created: 2018-10-30T20:31:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T16:59:22.000Z (over 6 years ago)
- Last Synced: 2025-03-17T22:06:39.495Z (2 months ago)
- Topics: binding, c, cinterop, interop, kotlin, kotlin-native, n-api, napi, native, node
- Language: Vim script
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
napi
====
N-API C Interop for Kotlin/Native## Installation
```sh
$ npm install @datkt/napi
```## Prerequisites
* [Kotlin/Native](https://github.com/JetBrains/kotlin-native) and the
`konanc` command line program.
* [node\_api.h](https://github.com/nodejs/node/blob/master/src/node_api.h)## Usage
```sh
## Compile a shared library with 'module.kt' and link napi.klib found in `node_modules/`$ konanc -r node_modules/@datkt -l napi/napi -p shared -o binding module.kt ## Linux
$ konanc -r node_modules/@datkt -l napi/napi -p dynamic -o binding module.kt ## OSX$ mv libbinding.so binding.node
$ node -e "require('./binding')"
```> TODO
## See Also
* https://nodejs.org/api/n-api.html
## License
MIT