1 unstable release

0.1.0-alpha.4 Feb 17, 2024

#17 in #openid

Download history 138/week @ 2024-02-11 34/week @ 2024-02-18 25/week @ 2024-02-25 1/week @ 2024-03-03 15/week @ 2024-03-31 128/week @ 2024-04-14

143 downloads per month

MIT/Apache and GPL-3.0-only

400KB
6K SLoC

Rust 5K SLoC // 0.1% comments Kotlin 467 SLoC // 0.2% comments Swift 301 SLoC // 0.2% comments

Wallet

The Vercre wallet is a cross-platform app with a Rust core and native UI integrated using Mozilla's Foreign Function Interface (FFI) library, UniFFI.

This library contains the wallet's core business logic and FFI bindings. Developers can use it to build their own UIs in Swift, Kotlin, or TypeScript. Alternatively, simply clone the Vercre Wallet for a quicker start.

Cross-platform with Crux

Vercre uses Crux with its built-in FFI support to simplify the creation of wallets.

Crux splits the application into a Core built in Rust (this library), containing the business logic, and a Shell, or UI, built in the platform native language (Swift, Kotlin, TypeScript), that provides the interface with the external world.

The Core : Shell interface is a Foreign Function Interface (FFI) where simple data structures are passed both ways between the Rust Core and [Swift|Kotlin|Typescript] Shell.

Learn how to use Crux in your project.

Getting Started

See the Vercre Wallet.

Development

Generating FFI Bindings

Mozilla UniFFI generates foreign-language bindings for Rust libraries. It fits in the practice of consolidating business logic in a single Rust library while targeting multiple platforms, making it simpler to develop and maintain a cross-platform codebase.

cd vercre-wallet
cargo build
cargo uniffi-bindgen --out-dir ./gen ./src/shared.udl --language kotlin --language swift
# cargo run --bin uniffi-bindgen generate --out-dir ./gen ./src/shared.udl --language kotlin --language swift

Dependencies

~37MB
~535K SLoC