feat(log): implement mobile logging

This commit is contained in:
Lucas Nogueira
2023-01-16 17:47:43 -03:00
parent 58dd417f1b
commit 42037a7a99
4 changed files with 420 additions and 131 deletions
+12
View File
@@ -0,0 +1,12 @@
fn alias(alias: &str, has_feature: bool) {
if has_feature {
println!("cargo:rustc-cfg={alias}");
}
}
fn main() {
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
let mobile = target_os == "ios" || target_os == "android";
alias("desktop", !mobile);
alias("mobile", mobile);
}