
android/src/main/jniLibs/armeabi/libinrustwetrust.so
cp target/arm-linux-androideabi/debug/libinrustwetrust.so. cargo build -target=arm-linux-androideabi. the rust-jni/linker-wrapper.sh file was a ugly hack I needed to link when a link option was unavailable with the linker version, not sure it's still needed. Linker = "/Users/geal/dev/rust_on_mobile/rust-jni/linker-wrapper.sh" cargo/config file with the following content (adjust the paths, platform and SDK version accordingly):Īr = "/usr/local/Cellar/android-ndk/r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar" add the original project as dependency by path. Create the rust-jni project to host the JNI interface: cargo new rust-jni. LICENSE file, making a different branch for every version, and storing every podspecįile in a github repository, so be prepared to spend some time fighting those issues. #Rust video game download for mobile install#
cd InRustWeTrustKit/Example & pod install -verbose to test building with the example appĬocoaPods have a lot of requirements to push them to the repo, like having a valid. use pod lib lint -verbose to verify the podspec file.
add the prepare_command in the podspec file to build the library. update the source_files path in the podspec from InRustWeTrustKit/Classes/**/* to InRustWeTrustKit/InRustWeTrustKit/Classes/**/*. change InRustWeTrustKit/Example/Podfile to point to the pod at. move the podspec file at the root of the project. use the command pod lib create InRustWeTrustKit to create the pod with an example app. install the cocoapods: sudo gem install cocoapods (cf ). install cargo-lipo: cargo install cargo-lipo.
use rusty-cheddar to generate the headers, or write them manually. export some symbols with libc (for iOS).