Skip to content

Commit 56d1ce1

Browse files
itskhalilclaude
andcommitted
Replace xcodebuild with cc crate in build.rs
The pomace Objective-C files are compiled using the cc crate instead of invoking xcodebuild directly. This removes the hard dependency on Xcode.app, enabling builds with just Apple Command Line Tools and in sandboxed environments like Nix. Changes: - Use cc::Build to compile each pomace .m file individually - Add -fobjc-arc, -fobjc-weak, -fno-common flags to match Xcode's build settings - Add -include Foundation/Foundation.h for targets that import C-only frameworks (e.g. CoreAudio) but use Foundation types - Use CC env var / cc crate compiler detection for clang_rt discovery instead of hardcoded /usr/bin/clang - Try SDKROOT env var before falling back to xcrun for Mac Catalyst - Preserve all platform-conditional target gating from the original Framework linking is unchanged — cidre's Rust source handles it via #[link] attributes, same as before. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8bd2b40 commit 56d1ce1

File tree

2 files changed

+140
-164
lines changed

2 files changed

+140
-164
lines changed

cidre/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ visionos_26_1 = ["visionos_26_0"]
280280

281281
# end of deployment targets
282282

283+
[build-dependencies]
284+
cc = "1"
285+
283286
[dependencies]
284287

285288
tokio = { optional = true, version = "1", default-features = false, features = ["macros", "rt", "rt-multi-thread", "time", "net", "process", "io-util"] }

0 commit comments

Comments
 (0)