Closed yushihang closed 9 months ago
hi @yushihang , what you say is correct but what you see in the Flutter repo is a legacy code (outdated) that needs to be removed, as you said the Rust code is called directly from the iOS/Android prebuilt libraries. This is the repo that should be taken as reference https://github.com/arnaucube/babyjubjub-rs
hi @yushihang , what you say is correct but what you see in the Flutter repo is a legacy code (outdated) that needs to be removed, as you said the Rust code is called directly from the iOS/Android prebuilt libraries. This is the repo that should be taken as reference https://github.com/arnaucube/babyjubjub-rs
Hi @plusema86 ,
Thank you for your response.
We are looking to compile a library that supports the iOS simulator. The prebuilt iOS library currently does not offer support for the iOS simulator, particularly for the arm64 architecture on Apple Silicon.
I have previously examined the code at https://github.com/arnaucube/babyjubjub-rs, and there are differences compared to the code in the prebuilt library.
Is it possible for us to obtain the latest Flutter SDK source code, including the Rust code for babyjubjub that matches the prebuilt library?
https://github.com/0xPolygonID/polygonid-flutter-sdk/blob/15750e3093eee2b16513090241050110d9223292/rust/src/lib.rs#L211C58-L211C58
unwrap() in the rust codes lacks a check for whether it is empty. When incorrect parameters are passed, it may result in a panic and cause the entire mobile app process to exit.
The following functions are not found in the Rust code, but they exist in the prebuilt iOS/Android libraries provided by the Flutter project. Moreover, the Dart FFI-related code calls these functions that are absent in the Rust code.
However, when the same function is run in the Flutter project using the prebuilt library, the result is a decimal format string, like '18586133768512220936620570745912940619677854269274689475585506675881198879027'.
(The BigInt values represented by both formats are equivalent)."