Can build wasmer to Android?

Hi, I want to use wasmer on Android recently, more specifically React Native.

But when I try to link libwasmer.so to my own Android app, it can be linked but the app can't work well and I have no idea how to fix that.

I use the arch x86_64 and the libwasmer.so is download in wasmerio.

Is the libwasmer.so not accepted on Android?

And I heard that cargo-ndk may help, so can I build wasmer with cargo-ndk to fit the Android environment? And how?

Hope to get your help!! :smiling_face:

The Wasmer repo's GitHub releases only include binaries for Linux, Windows, and MacOS, so that probably explains why linking didn't work correctly for Android.

Wasmer compiles to Android out of the box though, so it should be enough to compile your Rust crate with cargo ndk --target armeabi-v7a -o ./jniLibs build --release (or whatever architectures you want to target). At a previous company we built a library that used Wasmer under the hood and one of my coworkers integrated it an with native Android app, so this is definitely possible. You might need to check React Native's docs for how to link with native libraries to make sure you did everything correctly.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.