/yubikey-rsjs

experiment to make JS bindings from the yubikey rust crate

Primary LanguageRust

YubiKey Rust-nodeJS bridge experiment

How to create an API using Rust yubikey crate to Node.

I'm specifically interested in using the smart-card features.

This is edited from the hello-world example of the neon rust-node bridge.

Eventually, we will want this to work in Electron ( neon docs )

Run in the directory

rustup override set nightly
rustup target add wasm32-wasi
nvm use 12

npm install

which will build a file called index.node in the base directory. You can then plug-in a YubiKey and run

x = require('.')
x.yubikeySerial()

and should get the serial number of your yubikey.