Skip to content
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

Create bindings for Kotlin Multiplatform #774

Open
vitorpamplona opened this issue Aug 1, 2024 · 0 comments
Open

Create bindings for Kotlin Multiplatform #774

vitorpamplona opened this issue Aug 1, 2024 · 0 comments

Comments

@vitorpamplona
Copy link

Amethyst, a Nostr Client for Android, is looking to call the prover and verifier locally on Android. The goal is to verify external computing power offered by service providers via Data Vending Machines. Amethyst will request some computation, receive the result and proofs, and locally verify on the phone.

For that, we need to re-package each of STWO's binary targets and their respective dependencies to each of the potential Kotlin targets in a new Kotlin Multiplatform project. We can use the Kotlin bindings for Secp256k1 from ACINQ as a design reference for the work to be done. It uses a mix between JNI and native bindings to get the job done. The new library should be a one-stop-shop for STWO to run on Android, Java Desktop (Windows, Linux, MacOS), iOS, and even Kotlin-written WASM.

At a minimum, the new project must offer entry points to the prove and verify functions here: https://github.com/starkware-libs/stwo/blob/dev/crates/prover/src/core/prover/mod.rs . Ideally, dependencies that are not relevant to those functions should be removed to minimize the binary size and the amount of dependencies. Hopefully, the new project doesn't need to do much more than just calling STWO functions, but utilities to facilitate the use of STWO are welcome.

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

No branches or pull requests

1 participant