realm-js
realm-js copied to clipboard
unable to create a universal binary in electron
Realm uses prebuilt binaries, so I could not find a way to create a simple way to create a universal binary.
The only option I see is to use a x64 build (using an emulated termina) and a native arm64 build and then combine via lipos
am I missing something?
@untoldbyte Which platform/OS are you attempting to target?
It is possible to run npx prebuild-install within node_modules/realm and add flags to determine what arch to download and the path to save it in. From there it should be possible to create universal binary by combining the downloaded libs using something like llvm-lipo
mac intel and arm
@untoldbyte At the moment we do not have universal prebuilds, so currently the preferred way forward would be to create separate releases for x64 and arm. We may consider releasing universal binaries, but this will have an significant impact on the size of the downloaded prebuild.
is it ok possible to combine two .node addons into a single universal build?
@untoldbyte It should be possible. We just don't provide that at this time. But there nothing stopping someone from taking our prebuild and making a universal one.