Skip to content

petrzjunior/napi-pcsclite

Repository files navigation

napi-pcsclite

CI

Node.js 8.x Node.js 10.x Node.js 12.x Node.js 13.x

Simple yet powerful Node.js library for communicating with SmartCard.

⚠️ This library is under heavy development. API is subject to change every day.

Promised-based async API is provided on Windows, macOS and Linux for SmartCard readers built upon the PC/SC standard. Feel the power of universal N-API no matter if your computer runs Windows winscard or Unix pcsclite.

Building from source

🚀 Prebuilt binaries and examples coming soon!

You will need a C++ compiler installed (gcc/clang on Linux, XCode on macOS, Visual Studio on Windows).

There are two ways to build the library:

node-gyp has been with Node.js since the beginning and is de facto standard. It provides simple API and can be called by

$ npm install-gyp

cmake-js was written as a replacement to node-gyp, providing a full CMake experience and direct Electron compatibility. Call it with

$ npm install-cmake

Both ways will lead to the same result - binary will be created in build/Release/ and you can now run the example:

$ npm run exmaple

Compatibility

Library can be built with both node-gyp and cmake-js on any Node.js version >=6. Some tweaking of compiler paths might be needed, we officially support these combinations:

node-gyp

Can be built on Node.js >= 6.

Officially supported:

Node.js Windows macOS Linux
6.x ✔️ ✔️
7.x
8.x ✔️ ✔️ ✔️
9.x ✔️ ✔️
10.x ✔️ ✔️ ✔️
11.x ✔️ ✔️
12.x ✔️ ✔️ ✔️
13.x ✔️ ✔️ ✔️

cmake-js

Can be built on Node.js >= 6.

Officially supported:

Node.js Windows macOS Linux
6.x ✔️ ✔️
7.x
8.x ✔️ ✔️
9.x ✔️ ✔️
10.x ✔️ ✔️ ✔️
11.x ✔️ ✔️ ✔️
12.x ✔️ ✔️ ✔️
13.x ✔️ ✔️ ✔️