/images/hyperledger.png

Aries VCX is an open-source project developed by the Hyperledger Aries community. Aries VCX enables the exchange of verifiable credentials, in a secure and interoperable manner between different entities in a decentralized network.

Aries VCX is primarily written in Rust, which presents challenges when it comes to compiling it for android. Luckily, the team at Mozilla has developed the uniffi-rs crate, which enables the automatic generation of library bindings for other programming environments.

To set up the development environment for Uniffi Aries development, you need to:

You can set up Android Studio to assist with most of the stuff.

  1. Set up the android SDK and NDK, and make sure to expose two variables to the respective roots.
ANDROID_SDK=
ANDROID_NDK_ROOT=
  1. Set up the latest version of Rust.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Clone the repository.
git clone git@github.com:hyperledger/aries-vcx.git
  1. Work on the API and expose the interface on the vcx.udl file. You need to make sure the definition in the UDL matches the signature of the exposed method/interface.

  2. Run the build script and generate the bindings.

sh aries/wrappers/uniffi-aries-vcx/scripts/android.build.cargo.ndk.sh
  1. Work on the android demo application and run the application on a virtual x86 or physical device.

License

MIT License

Copyright (c) 2023 swaptr

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.