1.3.47 • Published 2 years ago

lentil-os-additions v1.3.47

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

This project is to see how we can run native OSX modules on Electron/javascript.

We use node-gyp to compile files that are defined in binding.gyp. See: https://github.com/nodejs/node-gyp

node-gyp only supports with python2.xx but not 3.xx, so we have to change the version when compiling if we did source activate tensorflow (which uses python3.xx). https://nodejs.org/api/addons.html

To update this npm package "lentil-macos-additions":

cd /app/nativelib/lentil-macos-additions Make changes to the files as necessary Increment version number in package.json Then run npm publish --access=public

You might have to update the electron version when building. Currently we're doing this manually, we should do this automatically as the electron version bumps up.

"HOME=~/.electron-gyp node-gyp rebuild --arch=arm --target=12.0.3 --dist-url=https://atom.io/download/electron --python=python2.7 && echo 'this is a test'",

This can be used for debugging lentil_native

const lentil_native = require("./nativelib/lentil-macos-additions/build/Release/lentil-macos-additions.node");