-
Notifications
You must be signed in to change notification settings - Fork 0
SPM support, platform concurrent execution. #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Swift Package Manager (SPM) support for iOS and implements platform concurrent execution capabilities. It restructures the iOS implementation to use SPM packaging while enabling multiple proof generation operations to run in parallel on both iOS and Android platforms.
Key changes:
- Migrated iOS plugin from traditional CocoaPods structure to SPM support
- Implemented concurrent execution for proof generation operations on both platforms
- Updated build tools and deployment targets across the project
Reviewed Changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Bumped version to 0.0.1-beta.5 |
| ios/flutter_rapidsnark/Sources/flutter_rapidsnark/FlutterRapidsnarkPlugin.swift | New SPM-structured iOS plugin with concurrent queue implementation |
| ios/flutter_rapidsnark/Package.swift | SPM package definition with rapidsnark dependency |
| ios/flutter_rapidsnark/Package.resolved | SPM package resolution file |
| ios/flutter_rapidsnark.podspec | Updated source files path for SPM structure |
| ios/Classes/FlutterRapidsnarkPlugin.swift | Removed old plugin implementation |
| example/lib/main.dart | Added concurrent proof generation test with 5 parallel operations |
| example/ios/* | Updated Xcode project configuration for SPM support and iOS 13.0 target |
| example/android/* | Updated Android build tools and Gradle versions |
| android/src/main/kotlin/com/rapidsnark/flutter_rapidsnark/FlutterRapidsnarkPlugin.kt | Added executor-based concurrent execution and improved error handling |
| android/build.gradle | Updated Kotlin and Android Gradle Plugin versions |
| CHANGELOG.md | Added release notes for version 0.0.1-beta.5 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| do { | ||
| let isValid = try groth16Verify( | ||
| proof: proof.data(using: .utf8)!, | ||
| inputs: inputs.data(using: .utf8)!, | ||
| verificationKey: verificationKey.data(using: .utf8)! |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force unwrapping with ! can cause crashes if string conversion to UTF-8 data fails. Use guard statements or nil-coalescing to handle potential failures safely.
| do { | |
| let isValid = try groth16Verify( | |
| proof: proof.data(using: .utf8)!, | |
| inputs: inputs.data(using: .utf8)!, | |
| verificationKey: verificationKey.data(using: .utf8)! | |
| guard | |
| let proofData = proof.data(using: .utf8), | |
| let inputsData = inputs.data(using: .utf8), | |
| let verificationKeyData = verificationKey.data(using: .utf8) | |
| else { | |
| result(FlutterError(code: "groth16Verify", message: "Invalid string encoding for proof/inputs/verificationKey", details: nil)) | |
| return | |
| } | |
| do { | |
| let isValid = try groth16Verify( | |
| proof: proofData, | |
| inputs: inputsData, | |
| verificationKey: verificationKeyData |
Copilot uses AI. Check for mistakes.
android/src/main/kotlin/com/rapidsnark/flutter_rapidsnark/FlutterRapidsnarkPlugin.kt
Outdated
Show resolved
Hide resolved
android/src/main/kotlin/com/rapidsnark/flutter_rapidsnark/FlutterRapidsnarkPlugin.kt
Show resolved
Hide resolved
…terRapidsnarkPlugin.kt Co-authored-by: Copilot <[email protected]>
No description provided.