1.1.1 • Published 6 years ago

jsni v1.1.1

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
6 years ago

jsni

version travis build BSD-3-Clause License downdloads

jsni is the interface for JavaScript and C/C++, which is vm neutral and keeps abi/api compatible.

So the developers can avoid rewriting their native modules once v8/nan or other vms api changes.

It is acronym for JavaScript Native Interface.

Usage

Prerequisites:

  • node 7.x or above
  • npm

We can try jsni beginning with the hello-world example.

First, clone it to your local machine.

git clone https://github.com/alibaba/jsni.git -b example

Second, install jsni using npm:

cd jsni/hello-world/
npm install jsni

Finnally we can build and run it:

node-gyp rebuild
node test.js

And it will show "hello".

The essential JavaScript code is like this:

var jsni = require("jsni");
var addon = nativeLoad("addon");
console.log(addon.hello());

Documentation

API Reference

Collaborators

  • Jin Yue <jinyue.derek@gmail.com>
  • hyj1991 <66cfat66@gmail.com>

License

BSD-3-Clause

1.1.1

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago