-
Notifications
You must be signed in to change notification settings - Fork 254
Description
This kind of sucks to do, but it's very hard for me to imagine that Lockbox will accept not being able to run unit tests (on-device tests in an emulator should still be possible, though, although this is a painful prospect).
Apparently we need to produce a jar file that contains both the java class files, and the compiled native code for every platform we want to support running tests on. I suspect in practice that means at least windows x86, x86_64, linux x86, x86_64, and macOS. Maybe linux arm/aarch64? Not sure.
This is a big pain. Cross compiling the rust shouldn't be a huge deal (hopefully? Supposedly rustup toolchain add can do everything), but I strongly suspect cross compiling OpenSSL/SQLcipher will suck (especially to windows and mac)
I suspect that the way to handling the native code dependencies in a sane manner will be to fetch precompiled versions.
Caveats there: On windows the ABI needs to match, and on all platforms we need to be sure to compile position independent code even though we're producing static libraries for our native code dependencies (for OpenSSL the only way I could find to build a static lib w/ PIC is to build a shared lib and grab the static lib it produces as an intermediate), since ultimately they're linked into a dynamic library.