From 8d141d6e03c57086b92e1cef953797cfb333c189 Mon Sep 17 00:00:00 2001 From: wxitcode Date: Thu, 8 Aug 2024 22:56:26 +0800 Subject: [PATCH 1/2] feat: support macos log --- Cargo.toml | 2 +- frb_rust/Cargo.toml | 2 +- frb_rust/src/misc/user_utils.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a626f1ecef7..85ebd1e91ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ keywords = ["flutter", "dart", "ffi", "code-generation", "bindings"] categories = ["development-tools::ffi"] [workspace.dependencies] -allo-isolate = { version = "0.1.25", features = ["anyhow"] } +allo-isolate = "0.1.25" #allo-isolate = { git = "https://github.com/shekohex/allo-isolate", features = ["anyhow"] } anyhow = "1.0.64" chrono = "0.4.23" diff --git a/frb_rust/Cargo.toml b/frb_rust/Cargo.toml index 6cc938c08c7..7b3bbc748b5 100644 --- a/frb_rust/Cargo.toml +++ b/frb_rust/Cargo.toml @@ -49,7 +49,7 @@ web-sys = { version = "0.3.58", features = [ [target.'cfg(target_os = "android")'.dependencies] android_logger = { version = "0.13" , optional = true } -[target.'cfg(target_os = "ios")'.dependencies] +[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies] oslog = { version = "0.1.0" , optional = true } [build-dependencies] diff --git a/frb_rust/src/misc/user_utils.rs b/frb_rust/src/misc/user_utils.rs index 454882e5384..a31611a1507 100644 --- a/frb_rust/src/misc/user_utils.rs +++ b/frb_rust/src/misc/user_utils.rs @@ -28,7 +28,7 @@ fn setup_log_to_console() { android_logger::Config::default().with_max_level(log::LevelFilter::Trace), ); - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "ios", target_os = "macos"))] let _ = oslog::OsLogger::new("frb_user") .level_filter(log::LevelFilter::Trace) .init(); From e2da89a305f2eb390d5e221c6b31ff2c25a499e7 Mon Sep 17 00:00:00 2001 From: wxitcode Date: Fri, 9 Aug 2024 11:18:42 +0800 Subject: [PATCH 2/2] keep the original crate "allo-isolate" workspace --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 85ebd1e91ff..a626f1ecef7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ keywords = ["flutter", "dart", "ffi", "code-generation", "bindings"] categories = ["development-tools::ffi"] [workspace.dependencies] -allo-isolate = "0.1.25" +allo-isolate = { version = "0.1.25", features = ["anyhow"] } #allo-isolate = { git = "https://github.com/shekohex/allo-isolate", features = ["anyhow"] } anyhow = "1.0.64" chrono = "0.4.23"