staltz / sodium-native-nodejs-mobile

Low level bindings for libsodium
MIT License
5 stars 6 forks source link

static build #9

Open mafintosh opened 3 years ago

mafintosh commented 3 years ago

Hi!

Don't know if this is useful at all but 3.3.0 of sodium-native uses a simple static build now, so it might be a lot easier to make it build on android.

staltz commented 3 years ago

Thanks! What exactly does static build mean? NAPI?

mafintosh commented 3 years ago

It means it doesn’t build the libsodium as a dynamic build first, but builds it as a static lib that is then compiled into the napi build directly instead of linking it.

staltz commented 3 years ago

Ah, right! That may simplify my workflow, indeed. I'll try to update this repo to upstream main but unfortunately I think there are still some hacks needed, so that's why the fork.

mafintosh commented 3 years ago

Our build script is a simple js file. If it makes sense I’m happy to have the hacks there for android to avoid needing a fork

staltz commented 3 years ago

Good to hear that you'd be open for a PR. I'll see what I can do. Thanks!

freddi301 commented 2 years ago

It would help with this error on android emulators

Error: dlopen failed: library "libstdc++.so.6" not found: needed by /data/data/com.myapp/files/nodejs-project/node_modules/sodium-native-nodejs-mobile/build/Release/sodium.node