Skip to content

Conversation

5eeman
Copy link
Contributor

@5eeman 5eeman commented Oct 13, 2025

No description provided.

@5eeman 5eeman requested a review from demonsh October 13, 2025 12:23
@5eeman 5eeman self-assigned this Oct 13, 2025
@5eeman 5eeman requested a review from Copilot October 13, 2025 13:00
Copy link

@Copilot Copilot AI left a 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.

Comment on lines +131 to +135
do {
let isValid = try groth16Verify(
proof: proof.data(using: .utf8)!,
inputs: inputs.data(using: .utf8)!,
verificationKey: verificationKey.data(using: .utf8)!
Copy link

Copilot AI Oct 13, 2025

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.

Suggested change
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.

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.

1 participant