diff --git a/README.md b/README.md index e8b26eb..da32d9e 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,38 @@ -This is a minimal test application based on `GameActivity` that just -runs a mainloop based on android_activity::poll_events() and traces -the events received without doing any rendering. It also saves and -restores some minimal application state. +# Grim + +Cross-platform GUI for [Grin](https://github.com/mimblewimble/grin) on [Rust](https://stackoverflow.blog/2020/01/20/what-is-rust-and-why-is-it-so-popular/) with focus on usability and availability to be used by anyone, anywhere. Named by character [Grim](https://harrypotter.fandom.com/wiki/Grim) - giant, spectral dog that haunts churchyards. +## Build instructions +### Install Rust +`curl https://sh.rustup.rs -sSf | sh` + +### Desktop + +To build and run application go to project directory and run: ``` -export ANDROID_NDK_HOME="path/to/ndk" -export ANDROID_HOME="path/to/sdk" - -rustup target add aarch64-linux-android -cargo install cargo-ndk - -export CPPFLAGS="-DMDB_USE_ROBUST=0" && export CFLAGS="-DMDB_USE_ROBUST=0" && cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build -./gradlew build -./gradlew installDebug -adb shell am start -n mw.gri.android/.MainActivity +cargo build release +./target/release/grim ``` + +### Android +#### Set up the environment + +Install Android SDK / NDK / Platform Tools +``` +brew cask install android-sdk android-ndk android-platform-tools +``` + +Add to your `.bashprofile` or `.zshrc`: +``` +export ANDROID_HOME="$(brew --prefix)/share/android-sdk" +export PATH=$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools +export ANDROID_NDK_HOME="$(brew --prefix)/share/android-ndk" +``` + +#### Build the project +Run Android emulator or connect a real device. Command `adb devices` should show at least one device. +In the root of the repo run `./build_run_android.sh release {arch}`, where is `arch` is `v7` or `v8` based on device CPU architecture. + +## License + +Apache License v2.0. \ No newline at end of file