Skip to content

Cargo crate patches needed for visionOS networking support #103

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

Merged
merged 7 commits into from
May 21, 2024
Merged
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
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[target.aarch64-apple-ios-sim]
runner = "cargo dinghy -p auto-ios-aarch64-sim runner --"

[target.aarch64-apple-visionos-sim]
runner = "cargo dinghy -p auto-visionos-aarch64-sim runner --"

[target.x86_64-apple-ios]
runner = "cargo dinghy -p auto-ios-x86_64 runner --"

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ jobs:
x86_64-apple-ios
aarch64-apple-darwin
x86_64-apple-darwin
- uses: maxim-lobanov/[email protected]
with:
xcode-version: latest-stable


- uses: taiki-e/install-action@v2
with:
Expand Down
24 changes: 17 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ members = [
version = "0.3.0-alpha"
rust-version = "1.64"
authors = [
"Paul Schoenfelder <[email protected]>",
"Thomas Sieverding <[email protected]>",
"Paul Schoenfelder <[email protected]>",
"Thomas Sieverding <[email protected]>",
"Elle Imhoff <[email protected]>"
]
description = "Provides core, cross-platform functionality for LiveView Native implementations"
Expand Down Expand Up @@ -38,8 +38,18 @@ debug = 1


[patch.crates-io]
# Work for https://github.com/sfackler/rust-native-tls/pull/285 hasn't been published to crates.io yet.
native-tls = { git = "https://github.com/sfackler/rust-native-tls", rev = "0b69ce6a3c4bfe973ede44f6862fc13f3f09c773" }
# work for https://github.com/kornelski/rust-security-framework/pull/190 hasn't been published to crates.io yet.
security-framework = { git = "https://github.com/kornelski/rust-security-framework/", rev = "54d905027e50ec4f0969824efa8e34581922a1f4" }
security-framework-sys = { git = "https://github.com/kornelski/rust-security-framework/", rev = "54d905027e50ec4f0969824efa8e34581922a1f4" }
# https://github.com/sfackler/rust-native-tls/pull/294
native-tls = { git = "https://github.com/simlay/rust-native-tls.git", branch = "add-visionos-support" }

# https://github.com/kornelski/rust-security-framework/pull/201
security-framework = { git = "https://github.com/simlay/rust-security-framework.git", branch = "add-visionos-support" }
security-framework-sys = { git = "https://github.com/simlay/rust-security-framework.git", branch = "add-visionos-support" }

# https://github.com/tokio-rs/mio/pull/1773 and backport PR.
mio = { git = "https://github.com/simlay/mio.git", rev = "7b8b2e605ad64bcabf1f0af4366aa404a8b6bbdc" }

# https://github.com/rust-lang/socket2/pull/503
socket2 = { git = "https://github.com/QuentinPerez/socket2.git", rev = "ca3a93088857b40c27e98d1690f242a7ba8da4dc" }

# https://github.com/tokio-rs/tokio/pull/6465 hasn't been published yet
tokio = { git = "https://github.com/tokio-rs/tokio.git", rev = "6fcd9c02176bf3cd570bc7de88edaa3b95ea480a"}
14 changes: 8 additions & 6 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ args = [
"--target", "aarch64-apple-ios-sim",
"--target", "x86_64-apple-ios",

#"--target", "aarch64-apple-visionos",
#"--target", "aarch64-apple-visionos-sim",
"-p", "liveview-native-core"
]
dependencies = ["install-targets"]
Expand All @@ -151,6 +149,9 @@ args = [
"--target", "aarch64-apple-watchos",
"--target", "x86_64-apple-watchos-sim",

"--target", "aarch64-apple-visionos",
"--target", "aarch64-apple-visionos-sim",

"--target", "aarch64-apple-tvos",
"--target", "aarch64-apple-tvos-sim",
"--target", "x86_64-apple-tvos",
Expand Down Expand Up @@ -378,12 +379,12 @@ args = [
"-headers", "${CARGO_TARGET_DIR}/uniffi/swift/generated",

# visionOS
#"-library", "${CARGO_TARGET_DIR}/aarch64-apple-visionos/${CARGO_BUILD_TYPE}/libliveview_native_core.a",
#"-headers", "${CARGO_TARGET_DIR}/uniffi/swift/generated",
"-library", "${CARGO_TARGET_DIR}/aarch64-apple-visionos/${CARGO_BUILD_TYPE}/libliveview_native_core.a",
"-headers", "${CARGO_TARGET_DIR}/uniffi/swift/generated",

# visionOS sim
#"-library", "${CARGO_TARGET_DIR}/aarch64-apple-visionos-sim/${CARGO_BUILD_TYPE}/libliveview_native_core.a",
#"-headers", "${CARGO_TARGET_DIR}/uniffi/swift/generated",
"-library", "${CARGO_TARGET_DIR}/aarch64-apple-visionos-sim/${CARGO_BUILD_TYPE}/libliveview_native_core.a",
"-headers", "${CARGO_TARGET_DIR}/uniffi/swift/generated",
]
dependencies = [
"build-apple-std-targets",
Expand All @@ -410,6 +411,7 @@ dependencies = [
"uniffi-swift-test-ios",
"uniffi-swift-test-macos",
"uniffi-swift-test-watchos",
#"uniffi-swift-test-visionos", # TODO: uncomment this when the default xcode is 15.2 for github CI images.
]

[tasks.uniffi-swift-test-package]
Expand Down
Loading