Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Build issues caused by importing swift-rs #224

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions native/hub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ tracing-appender = "0.2.3"
chrono = "0.4.38"
windows = { version = "0.58.0", features = ["Services", "Services_Store" ] }
sha2 = "0.10.8"
swift-rs = "1.0.7"

[build-dependencies]
anyhow = { version = "1.0.89", features = ["backtrace"] }
Expand All @@ -47,13 +46,17 @@ vergen-git2 = { version = "1.0.1", features = [
"rustc",
"si",
] }
swift-rs = { version = "1.0.7", features = ["build"] }


# Uncomment below to target the web.
# tokio_with_wasm = { version = "0.6.0", features = ["sync", "rt"] }
# wasm-bindgen = "0.2.92"

# Android dependencies
[target.'cfg(target_os = "android")'.dependencies]
tracing-logcat = "0.1.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF is removed, please recover the last empty line to ensure consistency.

tracing-logcat = "0.1.0"

[target.'cfg(target_os = "macos")'.dependencies]
swift-rs = "1.0.7"

[target.'cfg(target_os = "macos")'.build-dependencies]
swift-rs = { version = "1.0.7", features = ["build"] }
2 changes: 2 additions & 0 deletions native/hub/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::Result;
use std::env;
#[cfg(target_os = "macos")]
use swift_rs::SwiftLinker;
use vergen_git2::{BuildBuilder, Emitter, Git2Builder, RustcBuilder};

Expand All @@ -23,6 +24,7 @@ fn main() -> Result<()> {
let target = std::env::var("TARGET").unwrap();

if target.contains("darwin") {
#[cfg(target_os = "macos")]
SwiftLinker::new("10.13")
.with_ios("12")
.with_package("apple-bridge-library", "./apple-bridge-library/")
Expand Down
Loading