We’ve accelerated this bounty with 10 more ICP from the DFINITY Acceleration Grant.
We are going to set aside 5 ICP for the dec that added the wasm stuff to the android build. This is now a 26 ICP bounty for basically setting up some config files. If you want to get involved in building for the IC, this is a great spot to do it!
Expo (React Native) JS Engine when running in Debug
Shake phone, and tap Debug Remote JS, you’ll notice the app now works on Android. This is because the JS Engine on Android in Debug mode supports BigInt
But that means normal mode and native builds do not #FunTimes
Basically the */**===&| etc etc ops, don’t work reliably via the polyfill. These seem to give unexpected results and as such the while loops runs forever.
This only happens is the typeof of a bigint is object, thus not native support. If typeof is bigint it works.
@dpdp - did you pull the bls verification code that you’re patching in from an existing package, or did you write it yourself? If it is from Origyn, do we have your permission to add it to agent-js? I’ve just merged support to polyfill BLS verification without patching feat: support for bls verification polyfill by krpeacock · Pull Request #626 · dfinity/agent-js · GitHub, and I’d like to make this process simple by shipping the polyfill as an additional package on NPM as @dfinity/bls-verify, so that we don’t have to ask people to copy a large file around
FWIW I also went down the Rust FFI route. It works and is really fast, but it requires a lot of platform-specific setup and code, which makes it less like a library and more like a framework.
At the very least, going forward you’ll be able to pass a blsVerify option to an Actor and polyfill it however you choose without needing to patch node_modules. I’m also going to provide a pure JS package for it, but it is very slow. I’ll see if I can optimize it by stripping out overhead in the miracl implementation