add flutter feature and rename mobile to flutter

This commit is contained in:
SoLongAndThanksForAllThePizza 2022-05-25 20:23:02 +08:00
parent 3081df429e
commit 4d324063c5
4 changed files with 9 additions and 7 deletions

View File

@ -22,7 +22,8 @@ cli = []
use_samplerate = ["samplerate"]
use_rubato = ["rubato"]
use_dasp = ["dasp"]
default = ["use_dasp"]
flutter = ["flutter_rust_bridge"]
default = ["use_dasp","flutter"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -52,6 +53,7 @@ rpassword = "6.0"
base64 = "0.13"
sysinfo = "0.23"
num_cpus = "1.13"
flutter_rust_bridge = { version = "1.30.0", optional = true }
[target.'cfg(not(target_os = "linux"))'.dependencies]
reqwest = { version = "0.11", features = ["json", "rustls-tls"], default-features=false }
@ -99,7 +101,7 @@ async-process = "1.3"
android_logger = "0.11"
jni = "0.19.0"
[target.'cfg(any(target_os = "android", target_os = "ios", target_os = "linux"))'.dependencies]
[target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies]
flutter_rust_bridge = "1.30.0"
[workspace]

View File

@ -21,12 +21,12 @@ pub mod ipc;
pub mod ui;
mod version;
pub use version::*;
// #[cfg(any(target_os = "android", target_os = "ios"))]
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
mod bridge_generated;
// #[cfg(any(target_os = "android", target_os = "ios"))]
pub mod mobile;
// #[cfg(any(target_os = "android", target_os = "ios"))]
pub mod mobile_ffi;
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
pub mod flutter;
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
pub mod flutter_ffi;
use common::*;
#[cfg(feature = "cli")]
pub mod cli;