-
Notifications
You must be signed in to change notification settings - Fork 88
Adding support for android (and others architectures) #92
Description
Hi, I'll add support for other architectures. Take a look at the structure of the prebuilt binaries I have:
|-- android
| |-- arm64-v8a
| | |-- include
| | |-- lib
| | `-- share
| |-- armeabi-v7a
| | |-- include
| | |-- lib
| | `-- share
| |-- x86
| | |-- include
| | |-- lib
| | `-- share
| `-- x86_64
| |-- include
| |-- lib
| `-- share
`-- desktop
|-- aarch64
| |-- include
| |-- lib
| `-- share
|-- x86_64
| |-- bin
| |-- include
| |-- lib
| `-- share
`-- x86_64_generic
|-- bin
|-- include
|-- lib
`-- share
they're respecting android's jniLibs search model (even though we won't use it in this project). I have a docker container that builds then in this structure. For desktop this container builds with some hardware decoding support which is nice, I may link it here in the future, gotta clean it.
Anyways, looks like for now, rust-ffmpeg-sys supports specifying a folder that contains lib, bin, include. I'm planning to add an environment variable called MULTI_ARCHITECTURE_PREBUILT which would point to the root of my tree I just pasted here. Then if it's android it goes into android + right arch. I think I might change desktop/{x86_64,aarch64,x86_64_generic} to desktop/{linux/macos/windows}/{x86_64,aarch64,x86_64_generic}. Also there should be an iOS folder. What you think?
I'll have to delay iOS, Windows and macOS support because I dont have them now to build, but I plan to support them.
I also didn't look at how to use cargo to cross compile (for android for now) using build.rs. Gonna look on that. If somebody have a tip I appreciate. I want to build for android on linux, and for linux on linux (which already works)