node-pqclean icon indicating copy to clipboard operation
node-pqclean copied to clipboard

Prevents build from completing in React Native

Open amlord opened this issue 6 months ago • 2 comments

Hi @tniessen,

This probably isn't something unexpected, as it's not a standard node environment, but just wanted to record it here in case it's functionality you'd like to support.

I've been busy packaging up this lib, and found that this package causes the build to fail in React Native for iOS (I haven't yet tried Android). The issue disappears if I comment out the code in this catch block: https://github.com/tniessen/node-pqclean/blob/main/index.js#L7

This then causes the object properties to not be set, an functionality to not be available.

React Native doesn't come with support for wasm out of the box (it looks like there are some recent packages that might help with this, although I haven't tried them yet).

As the repo is a wrapper around the C libs, there might be a straightforward fix, although C to JS bindings come outside of my current area of expertise.

For now, I'm falling back to another package for React Native, and keeping pqclean for use in Node so it's not a blocker for me.

Kind regards, Andrew

amlord avatar Aug 23 '24 09:08 amlord