Skip to content

Conversation

@bryce-mcmath
Copy link

@bryce-mcmath bryce-mcmath commented Sep 25, 2025

Main point of this is modernizing to support React Native New Architecture and Android 16kb memory page size requirement.

Upgraded rust and c tool chain
Upgraded Node
Upgraded yarn
Upgraded React / React Native
Upgraded gradle
Updated Docker images
Updated CI macOS version
Updated broken test scripts
Added TurboModule support for new architecture
Updated min iOS and macOS deployment targets
Replaced node-pre-gyp with custom scripts matching askar-wrapper-javascript

@swcurran
Copy link
Member

@bryce-mcmath -- recent work in the Askar Wrapper might help with the failing tests.

FYI @TimoGlastra @genaris @andrewwhitehead @berendsliedrecht on this PR.

@@ -0,0 +1,20 @@
[env]
CMAKE_POLICY_VERSION_MINIMUM = "3.30"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid current CICD from breaking due to unsupported CMake version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not in Askar/anoncreds, right? Is there a reason why it breaks here, but not there?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zmq-related, which I don't believe askar or anoncreds use, so they likely don't need this

Comment on lines +4 to +14
[target.aarch64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.armv7-linux-androideabi]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.i686-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.x86_64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensuring the 16kb memory page size requirement is satisfied


env:
RUST_VERSION: "1.81.0"
RUST_VERSION: "1.85.0"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.82 is the oldest supported, 1.90 is the latest, this is a happy medium with no breaking changes

strategy:
matrix:
os: [macos-13, windows-latest, ubuntu-latest]
os: [macos-14, windows-latest, ubuntu-latest]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching Bifold and other Credo-based mobile apps CICD MacOS version

with:
shared-key: deps
cache-on-failure: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prevent stale cache if deps change

Comment on lines -30 to -32
# This is added so we can lock the version that zmq uses
# 0.1.49 is broken for ios targets
cmake = { version = "=0.1.48", optional = true }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS issue was fixed in 0.1.50

Comment on lines +90 to +97
if(${REACT_NATIVE_VERSION} GREATER_EQUAL 76)
target_link_libraries(
${PACKAGE_NAME}
ReactAndroid::jsi
ReactAndroid::reactnative
fbjni::fbjni
)
elseif(${REACT_NATIVE_VERSION} GREATER_EQUAL 71)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in 76 and up, reactnativejni is not included

Signed-off-by: Bryce McMath <[email protected]>

INDY_NETWORKS_GITHUB_RAW_BASE = (
"https://raw.githubusercontent.com/hyperledger/indy-did-networks/main"
"https://raw.githubusercontent.com/hyperledger/indy-node-monitor/main/fetch-validator-status/networks.json"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous URL no longer resolves so these tests were failing

Comment on lines +3 to +5
MACOSX_DEPLOYMENT_TARGET = "14.0"
IPHONEOS_DEPLOYMENT_TARGET = "15.1"
CMAKE_OSX_DEPLOYMENT_TARGET = "15.1"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@berendsliedrecht I think this is a slightly cleaner fix for setting the deployment targets, let me know what you think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think this is good :).

Signed-off-by: Bryce McMath <[email protected]>
@bryce-mcmath bryce-mcmath marked this pull request as ready for review October 6, 2025 21:29
@bryce-mcmath
Copy link
Author

@TimoGlastra @berendsliedrecht @genaris @andrewwhitehead ready for review when you have time, thanks for all the suggestions so far

@TimoGlastra
Copy link
Member

@bryce-mcmath can you verify that the changes from this branch are also covered in this PR to main: main...js-0.4.1

This branch is the version that Credo currently depends on. I see there's at least one fix in .cpp file

@berendsliedrecht
Copy link
Contributor

I'll add my review tomorrow!

@bryce-mcmath
Copy link
Author

@bryce-mcmath can you verify that the changes from this branch are also covered in this PR to main: main...js-0.4.1

This branch is the version that Credo currently depends on. I see there's at least one fix in .cpp file

ah I was unaware of this! I will back port those changes into this PR

@TimoGlastra
Copy link
Member

Thanks! it's a bit of a mess TBH so appreciate you cleaning up and fixing everything :)

Signed-off-by: Bryce McMath <[email protected]>
Signed-off-by: Bryce McMath <[email protected]>
Signed-off-by: Bryce McMath <[email protected]>
Copy link
Contributor

@berendsliedrecht berendsliedrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work!!

For maintenance in the future, it might also be good to split the wrappers into a new repo and move the js wrapper more to be consistent with askar/anoncreds (biomejs/node (or vite) test/pnpm). We sadly do not have the time for this anymore, but would be willing to help with this and give some pointers.

Comment on lines +3 to +5
MACOSX_DEPLOYMENT_TARGET = "14.0"
IPHONEOS_DEPLOYMENT_TARGET = "15.1"
CMAKE_OSX_DEPLOYMENT_TARGET = "15.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think this is good :).


ADD libindy_vdr .
COPY . .
RUN rustup show
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, was just using that for troubleshooting. Will remove

"host": "https://github.com/hyperledger/indy-vdr/releases/download",
"packageName": "library-ios-android.tar.gz"
},
"codegenConfig": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this codegen now fully working? I was expecting more changed in the C++ side. If this was just to test, it might be good to remove it again and look at it in a different PR as a single new feature.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good point, let me double check this. I'll move it back to draft for now and will re-request your review once I make any necessary changes

@bryce-mcmath bryce-mcmath marked this pull request as draft October 14, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants