signalapp / libsignal

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible.
GNU Affero General Public License v3.0
3.06k stars 362 forks source link

could not build on react-native #500

Closed monkeyWie closed 1 year ago

monkeyWie commented 1 year ago

Is there a way to run on react-natice?

error: Error: Unable to resolve module os from d:\code\study\node\gali\node_modules\node-gyp-build\index.js: os could not be found within the project or in these directories:
  node_modules
  1 | var fs = require('fs')
  2 | var path = require('path')
  3 | var os = require('os')
jrose-signal commented 1 year ago

The only supported platform is Electron, as used by the official Signal Desktop client. However, the use of node-gyp-build is mostly just to make sure the N-API-based Rust modules get built and loaded properly; if that's the only incompatibility with React-Native, it's possible you could skip the install script and get everything to work. Patches welcome as long as they don't cause an undue maintainence burden.

monkeyWie commented 1 year ago

Thank you for reply, I have rethought it, react-native not support NAPI, so this should not be possible, unless this is written in pure js.

ajitdas123 commented 1 year ago

@monkeyWie Did you find a way to use this library? or are you using any other for E2E encryption?

monkeyWie commented 1 year ago

@ajitdas123 no, but you can consider platform native module.