{"action":"created","issue":{"url":"https://api.github.com/repos/jxcore/jxcore/issues/880","repository_url":"https://api.github.com/repos/jxcore/jxcore","labels_url":"https://api.github.com/repos/jxcore/jxcore/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/jxcore/jxcore/issues/880/comments","events_url":"https://api.github.com/repos/jxcore/jxcore/issues/880/events","html_url":"https://github.com/jxcore/jxcore/issues/880","id":147979630,"number":880,"title":"Native npm module node-sodium cross compiled to Android ","user":{"login":"gardner","id":787026,"avatar_url":"https://avatars.githubusercontent.com/u/787026?v=3","gravatar_id":"","url":"https://api.github.com/users/gardner","html_url":"https://github.com/gardner","followers_url":"https://api.github.com/users/gardner/followers","following_url":"https://api.github.com/users/gardner/following{/other_user}","gists_url":"https://api.github.com/users/gardner/gists{/gist_id}","starred_url":"https://api.github.com/users/gardner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gardner/subscriptions","organizations_url":"https://api.github.com/users/gardner/orgs","repos_url":"https://api.github.com/users/gardner/repos","events_url":"https://api.github.com/users/gardner/events{/privacy}","received_events_url":"https://api.github.com/users/gardner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-13T08:03:40Z","updated_at":"2016-04-13T21:46:03Z","closed_at":null,"body":"What is the best approach for getting an npm module with native code cross compiled for use on Android?\r\n\r\nWe are trying to get the npm module [node-sodium](https://github.com/paixaop/node-sodium) into the runtime for use within and Android application. The problem is when doing an `npm install` from the host machine and then compiling jxcore with the android-ndk the npm module is compiled for the host platform's architecture. (e.g. jxcore is compiled for ARM while the npm native code is compiled for x86)\r\n\r\nShould we compile the library directly into the jxcore runtime and port the javascript to work from that level? Should we update the npm module to look for an ARCH environment variable and cross compile for Android? Does jxcore for android support shared libraries as such?\r\n\r\nI have been having trouble finding a similar example except for leveldown which is why I [started porting](https://github.com/gardner/jxcore/tree/feature/libsodium) libsodium into the jxcore runtime. It would be good to hear from someone with higher level view of the architecture if this is the appropriate approach.\r\n\r\nThank you,\r\n  Gardner"},"comment":{"url":"https://api.github.com/repos/jxcore/jxcore/issues/comments/209661994","html_url":"https://github.com/jxcore/jxcore/issues/880#issuecomment-209661994","issue_url":"https://api.github.com/repos/jxcore/jxcore/issues/880","id":209661994,"user":{"login":"obastemur","id":4390745,"avatar_url":"https://avatars.githubusercontent.com/u/4390745?v=3","gravatar_id":"","url":"https://api.github.com/users/obastemur","html_url":"https://github.com/obastemur","followers_url":"https://api.github.com/users/obastemur/followers","following_url":"https://api.github.com/users/obastemur/following{/other_user}","gists_url":"https://api.github.com/users/obastemur/gists{/gist_id}","starred_url":"https://api.github.com/users/obastemur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obastemur/subscriptions","organizations_url":"https://api.github.com/users/obastemur/orgs","repos_url":"https://api.github.com/users/obastemur/repos","events_url":"https://api.github.com/users/obastemur/events{/privacy}","received_events_url":"https://api.github.com/users/obastemur/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T21:46:03Z","updated_at":"2016-04-13T21:46:03Z","body":"Which engine you've been using with JXcore? If it was v8 3.14 you may follow leveldown-mobile approach without actually converting V8 API to JXcore macro."}}