Skip to content

Instantly share code, notes, and snippets.

@MarcTreySonos
Last active August 13, 2018 11:03
Show Gist options
  • Save MarcTreySonos/b306e41bc41b1b17aec25176a92dae21 to your computer and use it in GitHub Desktop.
Save MarcTreySonos/b306e41bc41b1b17aec25176a92dae21 to your computer and use it in GitHub Desktop.
cross compile snips-nlu-rs with dinghy

this exemple suppose :

  • you clone the project in the directory /home/user1
  • you have an Android standalone located at /home/user1/x-tools/NDKr17/arm64

update those path accordingly and check this page for reference https://github.com/snipsco/dinghy/blob/master/docs/android.md

Clone the snips-nlu-rs project

Clone the snips-nlu-rs project and the submodule, then enter the snips-nlu-lib folder

git clone https://github.com/snipsco/snips-nlu-rs
cd snips-nlu-rs
git submodule update --init --recursive
cd snips-nlu-lib

Create a dingy configuration

while being in the snips-nlu-lib , create a .dinghy folder in the project top directory and edit the dinghy.toml file

mkdir ../.dinghy
vi ../.dinghy/dinghy.toml 

with the content :

[test_data]
data = "/home/user1/git/ML/snips-nlu-rs/data"

[platforms.android-arm64]
rustc_triple='aarch64-linux-android'
toolchain='/home/user1/x-tools/NDKr17/arm64'

run the test on the devices

cargo dinghy -v --platform android-arm64 test

the output will show test result: ok. 69 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment