Based on the amazing napi-rs/package-template project.
yarn add @kontext21/k21
node14 | node16 | node18 | |
---|---|---|---|
Windows x64 | ✓ | ✓ | ✓ |
Windows x32 | ✓ | ✓ | ✓ |
Windows arm64 | ✓ | ✓ | ✓ |
macOS x64 | ✓ | ✓ | ✓ |
macOS arm64 | ✓ | ✓ | ✓ |
After yarn build/npm run build
command, you can see package-template.[darwin|win32|linux].node
file in project root. This is the native addon built from lib.rs.
yarn run bp
run yarn test/npm run test
to testing native addon.
- Install the latest
Rust
- Install
Node.js@10+
which fully supportedNode-API
- Install
yarn@1.x
- yarn
- yarn build
- yarn test
- yarn run bp
Afterwards you can import the locally build package into your project:
npm install ../k21-node/kontext21-k21-0.17.0.tgz