mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
refactor(rust): move crates into a more sensical hierarchy (#9066)
The current `rust/` directory is a bit of a wild-west in terms of how the crates are organised. Most of them are simply at the top-level when in reality, they are all `connlib`-related. The Apple and Android FFI crates - which are entrypoints in the Rust code are defined several layers deep. To improve the situation, we move around and rename several crates. The end result is that all top-level crates / directories are: - Either entrypoints into the Rust code, i.e. applications such as Gateway, Relay or a Client - Or crates shared across all those entrypoints, such as `telemetry` or `logging`
This commit is contained in:
8
.github/actions/setup-rust/action.yml
vendored
8
.github/actions/setup-rust/action.yml
vendored
@@ -18,14 +18,14 @@ outputs:
|
||||
description: Compilable packages for the current OS
|
||||
value: ${{
|
||||
(runner.os == 'Linux' && '--workspace') ||
|
||||
(runner.os == 'macOS' && '--workspace --exclude ebpf-turn-router --exclude gui-smoke-test --exclude connlib-client-android') ||
|
||||
(runner.os == 'Windows' && '--workspace --exclude ebpf-turn-router --exclude connlib-client-apple --exclude connlib-client-android') }}
|
||||
(runner.os == 'macOS' && '--workspace --exclude ebpf-turn-router --exclude gui-smoke-test --exclude android-client-ffi') ||
|
||||
(runner.os == 'Windows' && '--workspace --exclude ebpf-turn-router --exclude apple-client-ffi --exclude android-client-ffi') }}
|
||||
test-packages:
|
||||
description: Testable packages for the current OS
|
||||
value: ${{
|
||||
(runner.os == 'Linux' && '--workspace') ||
|
||||
(runner.os == 'macOS' && '-p connlib-client-apple -p connlib-client-shared -p firezone-tunnel -p snownet') ||
|
||||
(runner.os == 'Windows' && '-p connlib-client-shared -p connlib-model -p firezone-bin-shared -p firezone-gui-client -p firezone-headless-client -p firezone-logging -p firezone-telemetry -p firezone-tunnel -p gui-smoke-test -p http-test-server -p ip-packet -p phoenix-channel -p snownet -p socket-factory -p tun') }}
|
||||
(runner.os == 'macOS' && '-p apple-client-ffi -p client-shared -p firezone-tunnel -p snownet') ||
|
||||
(runner.os == 'Windows' && '-p client-shared -p connlib-model -p firezone-bin-shared -p firezone-gui-client -p firezone-headless-client -p firezone-logging -p firezone-telemetry -p firezone-tunnel -p gui-smoke-test -p http-test-server -p ip-packet -p phoenix-channel -p snownet -p socket-factory -p tun') }}
|
||||
nightly_version:
|
||||
description: The nightly version of Rust
|
||||
value: ${{ steps.nightly.outputs.nightly }}
|
||||
|
||||
@@ -233,7 +233,7 @@ cargo {
|
||||
// Needed for Ubuntu 22.04
|
||||
pythonCommand = "python3"
|
||||
prebuiltToolchains = true
|
||||
module = "../../../rust/connlib/clients/android"
|
||||
module = "../../../rust/android-client-ffi"
|
||||
libname = "connlib"
|
||||
verbose = true
|
||||
targets =
|
||||
|
||||
190
rust/Cargo.lock
generated
190
rust/Cargo.lock
generated
@@ -78,6 +78,39 @@ version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
|
||||
|
||||
[[package]]
|
||||
name = "android-client-ffi"
|
||||
version = "1.4.9"
|
||||
dependencies = [
|
||||
"android_log-sys",
|
||||
"anyhow",
|
||||
"backoff",
|
||||
"client-shared",
|
||||
"connlib-model",
|
||||
"dns-types",
|
||||
"firezone-logging",
|
||||
"firezone-telemetry",
|
||||
"flume",
|
||||
"futures",
|
||||
"ip-packet",
|
||||
"ip_network",
|
||||
"jni",
|
||||
"libc",
|
||||
"log",
|
||||
"phoenix-channel",
|
||||
"rustls",
|
||||
"secrecy",
|
||||
"serde_json",
|
||||
"socket-factory",
|
||||
"thiserror 1.0.69",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-subscriber",
|
||||
"tun",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android-tzdata"
|
||||
version = "0.1.1"
|
||||
@@ -154,6 +187,38 @@ version = "1.0.98"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
|
||||
|
||||
[[package]]
|
||||
name = "apple-client-ffi"
|
||||
version = "1.4.15"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"backoff",
|
||||
"client-shared",
|
||||
"connlib-model",
|
||||
"dns-types",
|
||||
"firezone-logging",
|
||||
"firezone-telemetry",
|
||||
"flume",
|
||||
"futures",
|
||||
"ip-packet",
|
||||
"ip_network",
|
||||
"libc",
|
||||
"oslog",
|
||||
"phoenix-channel",
|
||||
"rustls",
|
||||
"secrecy",
|
||||
"serde_json",
|
||||
"socket-factory",
|
||||
"swift-bridge",
|
||||
"swift-bridge-build",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-subscriber",
|
||||
"tun",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "arbitrary"
|
||||
version = "1.4.1"
|
||||
@@ -1054,6 +1119,34 @@ version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
||||
|
||||
[[package]]
|
||||
name = "client-shared"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"backoff",
|
||||
"bimap",
|
||||
"chrono",
|
||||
"connlib-model",
|
||||
"dns-types",
|
||||
"firezone-logging",
|
||||
"firezone-tunnel",
|
||||
"ip_network",
|
||||
"phoenix-channel",
|
||||
"rayon",
|
||||
"secrecy",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"snownet",
|
||||
"socket-factory",
|
||||
"thiserror 1.0.69",
|
||||
"time",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tun",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clipboard-win"
|
||||
version = "5.4.0"
|
||||
@@ -1124,99 +1217,6 @@ version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf0a07a401f374238ab8e2f11a104d2851bf9ce711ec69804834de8af45c7af"
|
||||
|
||||
[[package]]
|
||||
name = "connlib-client-android"
|
||||
version = "1.4.9"
|
||||
dependencies = [
|
||||
"android_log-sys",
|
||||
"anyhow",
|
||||
"backoff",
|
||||
"connlib-client-shared",
|
||||
"connlib-model",
|
||||
"dns-types",
|
||||
"firezone-logging",
|
||||
"firezone-telemetry",
|
||||
"flume",
|
||||
"futures",
|
||||
"ip-packet",
|
||||
"ip_network",
|
||||
"jni",
|
||||
"libc",
|
||||
"log",
|
||||
"phoenix-channel",
|
||||
"rustls",
|
||||
"secrecy",
|
||||
"serde_json",
|
||||
"socket-factory",
|
||||
"thiserror 1.0.69",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-subscriber",
|
||||
"tun",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "connlib-client-apple"
|
||||
version = "1.4.15"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"backoff",
|
||||
"connlib-client-shared",
|
||||
"connlib-model",
|
||||
"dns-types",
|
||||
"firezone-logging",
|
||||
"firezone-telemetry",
|
||||
"flume",
|
||||
"futures",
|
||||
"ip-packet",
|
||||
"ip_network",
|
||||
"libc",
|
||||
"oslog",
|
||||
"phoenix-channel",
|
||||
"rustls",
|
||||
"secrecy",
|
||||
"serde_json",
|
||||
"socket-factory",
|
||||
"swift-bridge",
|
||||
"swift-bridge-build",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-subscriber",
|
||||
"tun",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "connlib-client-shared"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"backoff",
|
||||
"bimap",
|
||||
"chrono",
|
||||
"connlib-model",
|
||||
"dns-types",
|
||||
"firezone-logging",
|
||||
"firezone-tunnel",
|
||||
"ip_network",
|
||||
"phoenix-channel",
|
||||
"rayon",
|
||||
"secrecy",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"snownet",
|
||||
"socket-factory",
|
||||
"thiserror 1.0.69",
|
||||
"time",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tun",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "connlib-model"
|
||||
version = "0.1.0"
|
||||
@@ -2196,7 +2196,7 @@ dependencies = [
|
||||
"backoff",
|
||||
"chrono",
|
||||
"clap",
|
||||
"connlib-client-shared",
|
||||
"client-shared",
|
||||
"connlib-model",
|
||||
"derive_more 1.0.0",
|
||||
"dirs 5.0.1",
|
||||
@@ -2258,7 +2258,7 @@ dependencies = [
|
||||
"anyhow",
|
||||
"backoff",
|
||||
"clap",
|
||||
"connlib-client-shared",
|
||||
"client-shared",
|
||||
"connlib-model",
|
||||
"dns-types",
|
||||
"firezone-bin-shared",
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"android-client-ffi",
|
||||
"apple-client-ffi",
|
||||
"bin-shared",
|
||||
"bufferpool",
|
||||
"connlib/clients/android",
|
||||
"connlib/clients/apple",
|
||||
"connlib/clients/shared",
|
||||
"client-shared",
|
||||
"connlib/bufferpool",
|
||||
"connlib/dns-over-tcp",
|
||||
"connlib/dns-types",
|
||||
"connlib/etherparse-ext",
|
||||
"connlib/ip-packet",
|
||||
"connlib/l4-tcp-dns-server",
|
||||
"connlib/l4-udp-dns-server",
|
||||
"connlib/model",
|
||||
"connlib/phoenix-channel",
|
||||
"connlib/snownet",
|
||||
"connlib/socket-factory",
|
||||
"connlib/tun",
|
||||
"connlib/tunnel",
|
||||
"dns-over-tcp",
|
||||
"dns-types",
|
||||
"etherparse-ext",
|
||||
"gateway",
|
||||
"gui-client/src-tauri",
|
||||
"headless-client",
|
||||
"ip-packet",
|
||||
"logging",
|
||||
"phoenix-channel",
|
||||
"relay/ebpf-shared",
|
||||
"relay/ebpf-turn-router",
|
||||
"relay/server",
|
||||
"socket-factory",
|
||||
"telemetry",
|
||||
"tests/gui-smoke-test",
|
||||
"tests/http-test-server",
|
||||
"tun",
|
||||
]
|
||||
|
||||
resolver = "2"
|
||||
@@ -36,7 +36,9 @@ license = "Apache-2.0"
|
||||
edition = "2024"
|
||||
|
||||
[workspace.dependencies]
|
||||
android-client-ffi = { path = "android-client-ffi" }
|
||||
anyhow = "1.0.98"
|
||||
apple-client-ffi = { path = "apple-client-ffi" }
|
||||
arboard = { version = "3.5.0", default-features = false }
|
||||
async-trait = { version = "0.1", default-features = false }
|
||||
atomicwrites = "0.4.4"
|
||||
@@ -50,28 +52,26 @@ backoff = { version = "0.4", features = ["tokio"] }
|
||||
base64 = { version = "0.22.1", default-features = false }
|
||||
bimap = "0.6"
|
||||
boringtun = { version = "0.6", default-features = false }
|
||||
bufferpool = { path = "bufferpool" }
|
||||
bufferpool = { path = "connlib/bufferpool" }
|
||||
bytecodec = "0.5.0"
|
||||
bytes = { version = "1.9.0", default-features = false }
|
||||
caps = "0.5.5"
|
||||
chrono = { version = "0.4", default-features = false, features = ["std", "clock", "oldtime", "serde"] }
|
||||
clap = "4.5.37"
|
||||
connlib-client-android = { path = "connlib/clients/android" }
|
||||
connlib-client-apple = { path = "connlib/clients/apple" }
|
||||
connlib-client-shared = { path = "connlib/clients/shared" }
|
||||
client-shared = { path = "client-shared" }
|
||||
connlib-model = { path = "connlib/model" }
|
||||
derive_more = "1.0.0"
|
||||
difference = "2.0.0"
|
||||
dirs = "5.0.1"
|
||||
divan = "0.1.17"
|
||||
dns-lookup = "2.0"
|
||||
dns-over-tcp = { path = "dns-over-tcp" }
|
||||
dns-types = { path = "dns-types" }
|
||||
dns-over-tcp = { path = "connlib/dns-over-tcp" }
|
||||
dns-types = { path = "connlib/dns-types" }
|
||||
ebpf-shared = { path = "relay/ebpf-shared" }
|
||||
either = "1"
|
||||
env_logger = "0.11.6"
|
||||
etherparse = { version = "0.17", default-features = false }
|
||||
etherparse-ext = { path = "etherparse-ext" }
|
||||
etherparse-ext = { path = "connlib/etherparse-ext" }
|
||||
firezone-bin-shared = { path = "bin-shared" }
|
||||
firezone-headless-client = { path = "headless-client" }
|
||||
firezone-logging = { path = "logging" }
|
||||
@@ -87,7 +87,7 @@ hex = "0.4.3"
|
||||
hex-display = "0.3.0"
|
||||
hex-literal = "0.4.1"
|
||||
humantime = "2.2"
|
||||
ip-packet = { path = "ip-packet" }
|
||||
ip-packet = { path = "connlib/ip-packet" }
|
||||
ip_network = { version = "0.4", default-features = false }
|
||||
ip_network_table = { version = "0.2", default-features = false }
|
||||
itertools = "0.13"
|
||||
@@ -116,7 +116,7 @@ opentelemetry_sdk = "0.29.0"
|
||||
os_info = { version = "3", default-features = false }
|
||||
output_vt100 = "0.1"
|
||||
parking_lot = "0.12.3"
|
||||
phoenix-channel = { path = "phoenix-channel" }
|
||||
phoenix-channel = { path = "connlib/phoenix-channel" }
|
||||
png = "0.17.16"
|
||||
proptest = "1.6.0"
|
||||
proptest-state-machine = "0.3.1"
|
||||
@@ -144,7 +144,7 @@ smallvec = "1.13.2"
|
||||
smbios-lib = "0.9.2"
|
||||
smoltcp = { version = "0.12", default-features = false }
|
||||
snownet = { path = "connlib/snownet" }
|
||||
socket-factory = { path = "socket-factory" }
|
||||
socket-factory = { path = "connlib/socket-factory" }
|
||||
socket2 = { version = "0.5" }
|
||||
static_assertions = "1.1.0"
|
||||
str0m = { version = "0.8.0", default-features = false, features = ["sha1"] }
|
||||
@@ -182,7 +182,7 @@ tracing-opentelemetry = "0.30.0"
|
||||
tracing-stackdriver = "0.11.0"
|
||||
tracing-subscriber = { version = "0.3.19", features = ["parking_lot"] }
|
||||
trackable = "1.3.0"
|
||||
tun = { path = "tun" }
|
||||
tun = { path = "connlib/tun" }
|
||||
url = "2.5.2"
|
||||
uuid = "1.16.0"
|
||||
which = "4.4.2"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "connlib-client-android"
|
||||
name = "android-client-ffi"
|
||||
# mark:next-android-version
|
||||
version = "1.4.9"
|
||||
edition = { workspace = true }
|
||||
@@ -13,7 +13,7 @@ doc = false
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
backoff = { workspace = true }
|
||||
connlib-client-shared = { workspace = true }
|
||||
client-shared = { workspace = true }
|
||||
connlib-model = { workspace = true }
|
||||
dns-types = { workspace = true }
|
||||
firezone-logging = { workspace = true }
|
||||
@@ -8,7 +8,7 @@
|
||||
use crate::tun::Tun;
|
||||
use anyhow::{Context as _, Result};
|
||||
use backoff::ExponentialBackoffBuilder;
|
||||
use connlib_client_shared::{Callbacks, DisconnectError, Session, V4RouteList, V6RouteList};
|
||||
use client_shared::{Callbacks, DisconnectError, Session, V4RouteList, V6RouteList};
|
||||
use connlib_model::ResourceView;
|
||||
use dns_types::DomainName;
|
||||
use firezone_logging::{err_with_src, sentry_layer};
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "connlib-client-apple"
|
||||
name = "apple-client-ffi"
|
||||
# mark:next-apple-version
|
||||
version = "1.4.15"
|
||||
edition = { workspace = true }
|
||||
@@ -11,7 +11,7 @@ swift-bridge-build = { workspace = true }
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
backoff = { workspace = true }
|
||||
connlib-client-shared = { workspace = true }
|
||||
client-shared = { workspace = true }
|
||||
connlib-model = { workspace = true }
|
||||
dns-types = { workspace = true }
|
||||
firezone-logging = { workspace = true }
|
||||
@@ -1,7 +1,7 @@
|
||||
const XCODE_CONFIGURATION_ENV: &str = "CONFIGURATION";
|
||||
|
||||
fn main() {
|
||||
let out_dir = "../../../../swift/apple/FirezoneNetworkExtension/Connlib/Generated";
|
||||
let out_dir = "../../swift/apple/FirezoneNetworkExtension/Connlib/Generated";
|
||||
|
||||
let bridges = vec!["src/lib.rs"];
|
||||
for path in &bridges {
|
||||
@@ -8,7 +8,7 @@ mod tun;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use backoff::ExponentialBackoffBuilder;
|
||||
use connlib_client_shared::{Callbacks, DisconnectError, Session, V4RouteList, V6RouteList};
|
||||
use client_shared::{Callbacks, DisconnectError, Session, V4RouteList, V6RouteList};
|
||||
use connlib_model::ResourceView;
|
||||
use dns_types::DomainName;
|
||||
use firezone_logging::err_with_src;
|
||||
@@ -40,7 +40,7 @@ pub fn get() -> Result<DeviceId> {
|
||||
/// Per <https://github.com/firezone/firezone/issues/2697> and <https://github.com/firezone/firezone/issues/2711>,
|
||||
/// clients must generate their own random IDs and persist them to disk, to handle situations like VMs where a hardware ID is not unique or not available.
|
||||
///
|
||||
/// Returns: The UUID as a String, suitable for sending verbatim to `connlib_client_shared::Session::connect`.
|
||||
/// Returns: The UUID as a String, suitable for sending verbatim to `client_shared::Session::connect`.
|
||||
///
|
||||
/// Errors: If the disk is unwritable when initially generating the ID, or unwritable when re-generating an invalid ID.
|
||||
pub fn get_or_create() -> Result<DeviceId> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "connlib-client-shared"
|
||||
name = "client-shared"
|
||||
version = "0.1.0"
|
||||
edition = { workspace = true }
|
||||
license = { workspace = true }
|
||||
@@ -19,7 +19,7 @@ atomicwrites = { workspace = true }
|
||||
backoff = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive", "env"] }
|
||||
connlib-client-shared = { workspace = true }
|
||||
client-shared = { workspace = true }
|
||||
connlib-model = { workspace = true }
|
||||
derive_more = { workspace = true, features = ["debug"] }
|
||||
firezone-bin-shared = { workspace = true }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use anyhow::{Context as _, Result, bail};
|
||||
use atomicwrites::{AtomicFile, OverwriteBehavior};
|
||||
use backoff::ExponentialBackoffBuilder;
|
||||
use connlib_client_shared::ConnlibMsg;
|
||||
use client_shared::ConnlibMsg;
|
||||
use firezone_bin_shared::{
|
||||
DnsControlMethod, DnsController, TunDeviceManager, device_id, device_info, known_dirs,
|
||||
platform::{tcp_socket_factory, udp_socket_factory},
|
||||
@@ -101,7 +101,7 @@ struct Handler<'a> {
|
||||
|
||||
struct Session {
|
||||
cb_rx: mpsc::Receiver<ConnlibMsg>,
|
||||
connlib: connlib_client_shared::Session,
|
||||
connlib: client_shared::Session,
|
||||
}
|
||||
|
||||
enum Event {
|
||||
@@ -383,7 +383,7 @@ impl<'a> Handler<'a> {
|
||||
.context("Failed to create `LoginUrl`")?;
|
||||
|
||||
self.last_connlib_start_instant = Some(Instant::now());
|
||||
let (callbacks, cb_rx) = connlib_client_shared::ChannelCallbackHandler::new();
|
||||
let (callbacks, cb_rx) = client_shared::ChannelCallbackHandler::new();
|
||||
|
||||
// Synchronous DNS resolution here
|
||||
let portal = PhoenixChannel::disconnected(
|
||||
@@ -404,7 +404,7 @@ impl<'a> Handler<'a> {
|
||||
|
||||
// Read the resolvers before starting connlib, in case connlib's startup interferes.
|
||||
let dns = self.dns_controller.system_resolvers();
|
||||
let connlib = connlib_client_shared::Session::connect(
|
||||
let connlib = client_shared::Session::connect(
|
||||
Arc::new(tcp_socket_factory),
|
||||
Arc::new(udp_socket_factory),
|
||||
callbacks,
|
||||
|
||||
@@ -11,7 +11,7 @@ license = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
backoff = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive", "env", "string"] }
|
||||
connlib-client-shared = { workspace = true }
|
||||
client-shared = { workspace = true }
|
||||
connlib-model = { workspace = true }
|
||||
dns-types = { workspace = true }
|
||||
firezone-bin-shared = { workspace = true }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use backoff::ExponentialBackoffBuilder;
|
||||
use clap::Parser;
|
||||
use connlib_client_shared::{ChannelCallbackHandler, ConnlibMsg, Session};
|
||||
use client_shared::{ChannelCallbackHandler, ConnlibMsg, Session};
|
||||
use firezone_bin_shared::{
|
||||
DnsControlMethod, DnsController, TOKEN_ENV_KEY, TunDeviceManager, device_id, device_info,
|
||||
new_dns_notifier, new_network_notifier,
|
||||
|
||||
@@ -3,5 +3,5 @@ disabled_rules:
|
||||
# necessarily imply immediate action needs to be taken.
|
||||
- todo
|
||||
excluded:
|
||||
- FirezoneNetworkExtension/Connlib/Generated/connlib-client-apple/connlib-client-apple.swift
|
||||
- FirezoneNetworkExtension/Connlib/Generated/apple-client-ffi/apple-client-ffi.swift
|
||||
- FirezoneNetworkExtension/Connlib/Generated/SwiftBridgeCore.swift
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
6FE454F62A5BFB93006549B1 /* Adapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE454EA2A5BFABA006549B1 /* Adapter.swift */; };
|
||||
6FE455092A5D110D006549B1 /* CallbackHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE455082A5D110D006549B1 /* CallbackHandler.swift */; };
|
||||
6FE4550C2A5D111E006549B1 /* SwiftBridgeCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE4550B2A5D111D006549B1 /* SwiftBridgeCore.swift */; };
|
||||
6FE4550F2A5D112C006549B1 /* connlib-client-apple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE4550E2A5D112C006549B1 /* connlib-client-apple.swift */; };
|
||||
6FE4550F2A5D112C006549B1 /* apple-client-ffi.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE4550E2A5D112C006549B1 /* apple-client-ffi.swift */; };
|
||||
6FE93AFB2A738D7E002D278A /* NetworkSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE93AFA2A738D7E002D278A /* NetworkSettings.swift */; };
|
||||
794C38152970A2660029F38F /* FirezoneKit in Frameworks */ = {isa = PBXBuildFile; productRef = 794C38142970A2660029F38F /* FirezoneKit */; };
|
||||
79756C6629704A7A0018E2D5 /* FirezoneKit in Frameworks */ = {isa = PBXBuildFile; productRef = 79756C6529704A7A0018E2D5 /* FirezoneKit */; };
|
||||
@@ -25,7 +25,7 @@
|
||||
8D5047F82CE6AA22009802E9 /* FirezoneKit in Frameworks */ = {isa = PBXBuildFile; productRef = 8D5047F72CE6AA22009802E9 /* FirezoneKit */; };
|
||||
8D5047FB2CE6AA37009802E9 /* FirezoneNetworkExtension-Bridging-Header.h in Sources */ = {isa = PBXBuildFile; fileRef = 6FE455112A5D13A2006549B1 /* FirezoneNetworkExtension-Bridging-Header.h */; };
|
||||
8D5047FC2CE6AA47009802E9 /* CallbackHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE455082A5D110D006549B1 /* CallbackHandler.swift */; };
|
||||
8D5047FD2CE6AA47009802E9 /* connlib-client-apple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE4550E2A5D112C006549B1 /* connlib-client-apple.swift */; };
|
||||
8D5047FD2CE6AA47009802E9 /* apple-client-ffi.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE4550E2A5D112C006549B1 /* apple-client-ffi.swift */; };
|
||||
8D5047FE2CE6AA54009802E9 /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05833DFA28F73B070008FAB0 /* PacketTunnelProvider.swift */; };
|
||||
8D5047FF2CE6AA54009802E9 /* Adapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE454EA2A5BFABA006549B1 /* Adapter.swift */; };
|
||||
8D5048002CE6AA60009802E9 /* SystemConfigurationResolvers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D6939312BA2521A00AF4396 /* SystemConfigurationResolvers.swift */; };
|
||||
@@ -96,7 +96,7 @@
|
||||
6FE454EA2A5BFABA006549B1 /* Adapter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Adapter.swift; sourceTree = "<group>"; };
|
||||
6FE455082A5D110D006549B1 /* CallbackHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallbackHandler.swift; sourceTree = "<group>"; };
|
||||
6FE4550B2A5D111D006549B1 /* SwiftBridgeCore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwiftBridgeCore.swift; path = Connlib/Generated/SwiftBridgeCore.swift; sourceTree = "<group>"; };
|
||||
6FE4550E2A5D112C006549B1 /* connlib-client-apple.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "connlib-client-apple.swift"; path = "Connlib/Generated/connlib-client-apple/connlib-client-apple.swift"; sourceTree = "<group>"; };
|
||||
6FE4550E2A5D112C006549B1 /* apple-client-ffi.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "apple-client-ffi.swift"; path = "Connlib/Generated/apple-client-ffi/apple-client-ffi.swift"; sourceTree = "<group>"; };
|
||||
6FE455112A5D13A2006549B1 /* FirezoneNetworkExtension-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FirezoneNetworkExtension-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
6FE93AFA2A738D7E002D278A /* NetworkSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkSettings.swift; sourceTree = "<group>"; };
|
||||
6FFECD5B2AD6998400E00273 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
@@ -174,7 +174,7 @@
|
||||
6FE455082A5D110D006549B1 /* CallbackHandler.swift */,
|
||||
6FE4550B2A5D111D006549B1 /* SwiftBridgeCore.swift */,
|
||||
8D41B9A42D15DD6800D16065 /* TunnelLogArchive.swift */,
|
||||
6FE4550E2A5D112C006549B1 /* connlib-client-apple.swift */,
|
||||
6FE4550E2A5D112C006549B1 /* apple-client-ffi.swift */,
|
||||
6FE455112A5D13A2006549B1 /* FirezoneNetworkExtension-Bridging-Header.h */,
|
||||
);
|
||||
path = FirezoneNetworkExtension;
|
||||
@@ -457,7 +457,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ../../rust/connlib/clients/apple\n./build-rust.sh\n";
|
||||
shellScript = "cd ../../rust/apple-client-ffi\n./build-rust.sh\n";
|
||||
};
|
||||
8D8555832D0A7CBB00A1EA09 /* Build Connlib */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@@ -477,7 +477,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd ../../rust/connlib/clients/apple\n./build-rust.sh\n";
|
||||
shellScript = "cd ../../rust/apple-client-ffi\n./build-rust.sh\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
files = (
|
||||
8DC08BD72B297DB400675F46 /* FirezoneNetworkExtension-Bridging-Header.h in Sources */,
|
||||
6FE455092A5D110D006549B1 /* CallbackHandler.swift in Sources */,
|
||||
6FE4550F2A5D112C006549B1 /* connlib-client-apple.swift in Sources */,
|
||||
6FE4550F2A5D112C006549B1 /* apple-client-ffi.swift in Sources */,
|
||||
8D41B9A52D15DD6800D16065 /* TunnelLogArchive.swift in Sources */,
|
||||
05CF1D17290B1FE700CF4755 /* PacketTunnelProvider.swift in Sources */,
|
||||
6FE454F62A5BFB93006549B1 /* Adapter.swift in Sources */,
|
||||
@@ -506,7 +506,7 @@
|
||||
8DE452A82CE6C194004CEDF9 /* main.swift in Sources */,
|
||||
8D5047FB2CE6AA37009802E9 /* FirezoneNetworkExtension-Bridging-Header.h in Sources */,
|
||||
8D5048042CE6B0AE009802E9 /* SwiftBridgeCore.swift in Sources */,
|
||||
8D5047FD2CE6AA47009802E9 /* connlib-client-apple.swift in Sources */,
|
||||
8D5047FD2CE6AA47009802E9 /* apple-client-ffi.swift in Sources */,
|
||||
8D5047FC2CE6AA47009802E9 /* CallbackHandler.swift in Sources */,
|
||||
8D5047FE2CE6AA54009802E9 /* PacketTunnelProvider.swift in Sources */,
|
||||
8D5048002CE6AA60009802E9 /* SystemConfigurationResolvers.swift in Sources */,
|
||||
@@ -734,7 +734,7 @@
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CONNLIB_SOURCE_DIR = "$(PROJECT_DIR)/../../rust/connlib/clients/apple";
|
||||
CONNLIB_SOURCE_DIR = "$(PROJECT_DIR)/../../rust/apple-client-ffi";
|
||||
CONNLIB_TARGET_DIR = "$(PROJECT_DIR)/../../rust/target";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
@@ -802,7 +802,7 @@
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CONNLIB_SOURCE_DIR = "$(PROJECT_DIR)/../../rust/connlib/clients/apple";
|
||||
CONNLIB_SOURCE_DIR = "$(PROJECT_DIR)/../../rust/apple-client-ffi";
|
||||
CONNLIB_TARGET_DIR = "$(PROJECT_DIR)/../../rust/target";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$(PROJECT_DIR)/FirezoneNetworkExtension/Connlib/Generated/connlib-client-apple/connlib-client-apple.swift
|
||||
$(PROJECT_DIR)/FirezoneNetworkExtension/Connlib/Generated/connlib-client-apple/connlib-client-apple.h
|
||||
$(PROJECT_DIR)/FirezoneNetworkExtension/Connlib/Generated/apple-client-ffi/apple-client-ffi.swift
|
||||
$(PROJECT_DIR)/FirezoneNetworkExtension/Connlib/Generated/apple-client-ffi/apple-client-ffi.h
|
||||
$(PROJECT_DIR)/FirezoneNetworkExtension/Connlib/Generated/SwiftBridgeCore.h
|
||||
$(PROJECT_DIR)/FirezoneNetworkExtension/Connlib/Generated/SwiftBridgeCore.swift
|
||||
$(PROJECT_DIR)/FirezoneNetworkExtension/Connlib/connlib.h
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
#define connlib_h
|
||||
|
||||
#include "Generated/SwiftBridgeCore.h"
|
||||
#include "Generated/connlib-client-apple/connlib-client-apple.h"
|
||||
#include "Generated/apple-client-ffi/apple-client-ffi.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,12 +5,12 @@ ARCH=$(shell uname -m)
|
||||
|
||||
build-macos:
|
||||
echo "Building debug build for ${PLATFORM}, ${ARCH}"
|
||||
cd ../../rust/connlib/clients/apple && rm -rf ./Connlib.xcframework && ./build-rust.sh && ./build-xcframework-dev.sh
|
||||
cd ../../rust/apple-client-ffi && rm -rf ./Connlib.xcframework && ./build-rust.sh && ./build-xcframework-dev.sh
|
||||
@xcodebuild build -scheme Firezone -sdk macosx -destination 'platform=${PLATFORM},arch=${ARCH}'
|
||||
|
||||
clean:
|
||||
@xcodebuild clean -scheme Firezone -sdk macosx -destination 'platform=${PLATFORM},arch=${ARCH}'
|
||||
cd ../../rust/connlib/clients/apple && rm -rf ./Connlib.xcframework
|
||||
cd ../../rust/apple-client-ffi && rm -rf ./Connlib.xcframework
|
||||
|
||||
.PHONY: format
|
||||
format:
|
||||
|
||||
@@ -24,7 +24,7 @@ fi
|
||||
|
||||
if [[ $ARG == "rust" ]] || [[ $ARG == "all" ]]; then
|
||||
set -x
|
||||
cd ../../rust/connlib/clients/apple && cargo clean
|
||||
cd ../../rust/apple-client-ffi && cargo clean
|
||||
cd Sources/Connlib/Generated && git clean -df
|
||||
set +x
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user