A Developer Experience Retrospective: Integrating MoPro with Anon Aadhaar
This is a developer experience blog from the Anon Aadhaar team lead, Vikas integrating MoPro.
For a long time, mobile proving has been tough for developers, especially with zero-knowledge proofs. Developers often spend more time running circuits on mobile than actually building them. A major factor for improving UX will be how quickly we can integrate these proving circuits into mobile apps.
Most mobile proving applications have historically used the Rapidsnark/Witnesscal setup, which is quite messy. It requires a good amount of app development experience, raising questions about how many code changes are needed compared to newer setups like Mopro.
In my past experience, it took me 15 days to figure out how to set up proving circuits on Android. One frustrating part of the Witnesscal/Rapidsnark setup is that you need to write native code for each platform. For binding functions in C++, you still have to write Java for Android and Objective-C for iOS. Recently, React Native has gotten some good updates with Turbo Repo architecture, which I thought could be a solution for this — https://hackmd.io/@0xvikasrushi/BJhNL6g_yl
Integration Time
How long does it take for a developer to integrate and run a circuit on mobile?
- You still need to write some native code, but it’s minimal. Mopro’s unified Rust bindings are shipped via a Kotlin package, so it’s pretty much plug-and-play. For Android, it’s fairly simple — no need to write any C++ code. :)
- Developers should focus on writing circuits rather than building an SDK. I was happy to only need to spend 3–4 days putting together a basic SDK that can generate and verify proofs—no need for a fancy frontend.
Code Changes Required
How many files need to be modified? Is the integration minimal or does it require significant changes?
- Previously, we had a
cpp/
folder filled with obscure, hard-to-maintain code — two types of binding, different binaries for witness calculation, and a complicated setup process. Now, that’s all automated, and integration is much smoother.
Cross-Platform Support
Does it require writing platform-specific code (e.g., Java for Android, Objective-C for iOS), or is it abstracted away?
- Yes, but only a very small amount of platform-specific code is needed.
- In this particular integration, we were able to go from 700 lines to less than 100 lines of actual code.
- These ~100 lines are native Kotlin logic used to bind native code to JavaScript, and the implementation is clean and generic enough.
Benchmark Performance
How do Mopro’s binding benchmarks compare to implementations like Anon Aadhaar?
- There was approximately a ~7% improvement in Execution time
LOG Mopro Execution time: 3957 milliseconds
LOG Rapidsnark Execution time: 4220 milliseconds
Conclusion
All in all, integrating Mopro with Anon Aadhaar allowed for:
- Fast proving with latest bindings + RapidSnark: Uses modern proving setups under the hood, so things run fast and smooth.
- Easy to plug in, great dev experience: Just works out of the box. We didn’t have to fight the SDK—focus stayed on writing circuits.
- Cross-platform code: Local, browser, or cloud—same code works across all platforms.
- Less platform-specific code: Code is clean and portable—no hacks or infra-specific tweaks needed.
- Future scaling: Architecture is solid. Easy to grow, optimize, and plug into bigger systems.