Open arqalite opened 2 months ago
I was planning on forking Tauri instead of submitting an issue, but I thought it's worth bringing up at least. Let me know what you think - I'm also willing to submit a PR if you agree to this change.
I understand if the Tauri team does not consider this worth dealing with, my setup is pretty obscure and I'm fine with just forking and making the changes for my own purposes.
Android is not a high priority for the bundler of course and given how minimal time and effort we have, we won't be actively fixing it.
However, PRs are always welcome, and we will gladly accept it if you have the time to work on it.
Describe the bug
I'm running a Linux environment on my Android phone (Galaxy Fold 4) using Termux, and I'm trying to build one of my Dioxus projects. Dioxus CLI makes use of tauri-bundler, which fails to compile on Termux because function
create_tar_from_src()
insrc/bundle/updater_bundle.rs
is only defined for macOS and Linux targets.cargo build
output:Termux makes use of Android's libc and as such Rust by default builds everything for the
aarch64-linux-android
target.A possible fix would be add Android to the Linux version of the function, so
#[cfg(target_os = "linux")]
becomes#[cfg(any(target_os = "android", target_os = "linux"))]
, however this might have some consequences I might not be aware of.Maybe we can switch the attributes around so the Mac version build as-is, but if the target OS is not Mac then we use the Linux version directly? (
#[cfg(target_os = "linux")]
would become#[cfg(not(target_os = "macos"))]
).This would avoid explicitly mentioning Android in the code in case that might cause issues or confusion.
I was planning on forking Tauri instead of submitting an issue, but I thought it's worth bringing up at least. Let me know what you think - I'm also willing to submit a PR if you agree to this change.
I understand if the Tauri team does not consider this worth dealing with, my setup is pretty obscure and I'm fine with just forking and making the changes for my own purposes.
Reproduction
Install Termux on an Android phone. Install Rust with
pkg install rust
, create a test project with Cargo and addtauri-bundler
to it. Then runcargo build
.Expected behavior
tauri-bundler
builds without error.Full
tauri info
outputN/A
Stack trace
N/A