From a7fe4a909b7a152a792d292c8c6144e1a5055b72 Mon Sep 17 00:00:00 2001 From: OscarTHZhang Date: Mon, 13 Jan 2025 09:25:24 -0800 Subject: [PATCH] Make the code compile on macOS (#125) With the optimization that build does not require Service Fabric runtime installed, building on any major platform is allowed. Here adding a small fix to make the code compile on macOS, though Service Fabric does not run natively on macOS. --- README.md | 7 ++++++- crates/libs/core/src/debug/mod.rs | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d344b73b..38674e11 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,12 @@ enabled = true ``` ## Quick Build -Build all Rust libraries and examples +Build Rust libraries only: +```sh +cargo build +``` + +Alternatively, build all Rust libraries and samples: ```sh cmake . -B build cmake --build build diff --git a/crates/libs/core/src/debug/mod.rs b/crates/libs/core/src/debug/mod.rs index e04a08b9..689dd717 100644 --- a/crates/libs/core/src/debug/mod.rs +++ b/crates/libs/core/src/debug/mod.rs @@ -18,3 +18,7 @@ pub fn wait_for_debugger() { #[cfg(target_os = "linux")] pub fn wait_for_debugger() {} + +/// macOS is not supported. This is merely to make this library to compile on macOS. +#[cfg(target_os = "macos")] +pub fn wait_for_debugger() {}