Skip to content

jolocom/rust-multi-target

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jolocom Native Core Bindings

This package contains Node and React Native bindings for jolocom/wallet-rs and jolocom/keriox

This is intended to be used through jolocom/vaulted-key-provider

It was originally based on the amazingReact Native Substrate Sign, from Parity.

Build and Develop

Requirements

  • node.js ( >=10)
  • yarn (tested on 1.6.0)
  • rustup (tested on rustup 1.21.0)
  • rustc (tested on rustc 1.41.1, from 1.42.0 rust dropped 32-bit apple target support)
  • cargo (tested on cargo 1.41.0)
  • android_ndk (tested on r21, can be downloaded here)
  • $NDK_HOME envarionment variable set to ndk home directory (eg. /usr/local/opt/android-ndk)

* It's recommended to install Android Studio and use that to install the necessary build tools and SDKs for the Android version you want to test on. It's also the best way to test in the emulator.

Setup

  • Use the following script to install the required rust toolchains.
./scripts/init.sh

Develop

After update the rust code, you need to change the following files for updating the interface to native android and ios code.

  • ios/core.h
  • ios/JolocomCore.m
  • ios/JolocomCore.swift
  • android/src/main/java/io/jolocom/JolocomCoreModule.java
  • index.js
  • index.d.ts

Test

  • To run the rust test
yarn test

Build

  • Use the following script to build the dynamic library for Android and static library for iOS.
./scripts/build.sh