LoginSignup
3
3

More than 5 years have passed since last update.

node-ffiの公式版をAtom Shellやio.jsで使うには

Last updated at Posted at 2015-03-22

2015/03/23 追記

先ほど、npmにあげたと案内が来たので、

npm install ffi で

でインストールできるようになった模様です。

追記ここまて

node-ffiとは

JavaScriptだけで、.soや.dylibなファイルの主にC言語ベースの
APIを叩くことを可能にするライブラリ。

例えば、頑張ればOpenCVをnode.jsからC言語を一切書かずに、扱うことが
出来る。

成り行きでパッチがマージされてしまったので

まだ、npmだとエラーになる

git clone https://github.com/node-ffi/node-ffi.git
cd node-ffi
npm install
cd ..
mv node-ffi ffi

Atom Shellで使うには

Atom Shellはこの後、専用のバイナリをリビルドする。

find . -name binding.gyp

出て来た、test以外のディレクトリに片っ端から行って、

HOME=~/.atom-shell-gyp node-gyp rebuild --target=0.22.1 --arch=x64 --dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist

を実行。

英語がもう少しできれば

英語がもう少しできれば、Winな方に作業を押し付けられたのにww

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3