mattrglobal / node-bbs-signatures

An implementation of BBS+ signatures using rust and typescript for node.js
Apache License 2.0
58 stars 27 forks source link

Apple Silicon binaries support #173

Closed preetpatel closed 2 years ago

preetpatel commented 2 years ago

Request to add apple silicon arm64 builds for this package to support builds on such systems.

Additionally, building a binary locally and trying to link it in a react-native project produces a further error ld: in /Users/preetpatel/Developer/project/ios/Pods/bbs-signatures/wrappers/obj-c/libraries/libbbs.a(absvdi2.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/preetpatel/Developer/project/ios/Pods/bbs-signatures/wrappers/obj-c/libraries/libbbs.a' for architecture arm64

Github actions as of today does not have Apple Silicon Mac build environments available so we'd have to look into manual releases or utilising a third party build server

berendsliedrecht commented 2 years ago

Hi right now I am running into the same issue. I have a locally built version of the package node-v93-darwin-arm64.tar.gz. It is not a permanent solution, but I was wondering if this file could be added to the assets for version 0.13.0? I checked the build pipeline a bit yesterday and I could not figure out where this could be added. Rust on an macOS x86 runner can build for m1, however node-gyp might cause some issues as it does not handle cross-compilation very well (https://github.com/neon-bindings/rfcs/issues/16#issuecomment-532732648).

@tplooker Is this something you could help with?

chriteixeira commented 2 years ago

Any plans to add support to it?

karimStekelenburg commented 2 years ago

I have experienced some headache due to this issue too. The errors thrown by the WASM fallback are somewhat useless due to the absence of clear error messages. This makes it almost impossible to develop on an M1 machine. When running the same code on a Linux machine, the same errors (now thrown by the node package) had clear messages that helped me move understand the problem.

Although the ideal scenario of course is to have an automated pipeline for releasing the arm64 package, I think @blu3beri's suggestion is a much needed temporary fix.

kenhuang commented 2 years ago

added node-v93-darwin-arm64.tar.gz to release 0.13.0.

tplooker commented 2 years ago

As per @kenhuang comment this issue is now resolved.