You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use napi-rs to create a native Node.js module for use with NodeJS-mobile on Android. In order to get native modules to work correctly with NodeJS-mobile on Android, they need to be linked with NodeJS-mobile's libnode.so at build time. This is because Android requires an entry for libnode.so in the ELF header of the module, or it will not look for the linked functions at runtime.
# Whileloadinganativenodemodule,Androidneedstohavea
# (NEEDED)entryforlibnode.so,oritwon't be able to locate# referenced symbols.# We link to the binary libraries that are distributed with the# nodejs-mobile headers so the (NEEDED) entry is created[ 'target_arch=="arm"',{'libraries': ['>(node_root_dir)/bin/armeabi-v7a/libnode.so'],}],['target_arch=="arm64"',{'libraries': ['>(node_root_dir)/bin/arm64-v8a/libnode.so'],}],['target_arch=="x86"',{'libraries': ['>(node_root_dir)/bin/x86/libnode.so'],}],['target_arch=="x86_64"',{'libraries': ['>(node_root_dir)/bin/x86_64/libnode.so'],}],
Would it be possible to deal with that with napi-rs?
The text was updated successfully, but these errors were encountered:
I'm trying to use
napi-rs
to create a native Node.js module for use with NodeJS-mobile on Android. In order to get native modules to work correctly with NodeJS-mobile on Android, they need to be linked with NodeJS-mobile'slibnode.so
at build time. This is because Android requires an entry forlibnode.so
in the ELF header of the module, or it will not look for the linked functions at runtime.Related to JaneaSystems/nodejs-mobile-gyp#4 (comment)
Would it be possible to deal with that with
napi-rs
?The text was updated successfully, but these errors were encountered: