Kit: move types from WireGuardKit to WireGuardKitTypes.

This prevents linking against wg-go when 3rd-party application needs to
use the WireGuardKit types from within the main bundle, therefore
prevents wg-go from spinning off Golang threads where not applicable.

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
Andrej Mihajlov
2022-03-11 13:25:29 +01:00
parent 23618f994f
commit a27dc674f1
12 changed files with 91 additions and 73 deletions
+7 -2
View File
@@ -10,13 +10,18 @@ let package = Package(
.iOS(.v12)
],
products: [
.library(name: "WireGuardKit", targets: ["WireGuardKit"])
.library(name: "WireGuardKit", targets: ["WireGuardKit"]),
.library(name: "WireGuardKitTypes", targets: ["WireGuardKitTypes"])
],
dependencies: [],
targets: [
.target(
name: "WireGuardKit",
dependencies: ["WireGuardKitGo", "WireGuardKitC"]
dependencies: ["WireGuardKitC", "WireGuardKitGo", "WireGuardKitTypes"]
),
.target(
name: "WireGuardKitTypes",
dependencies: ["WireGuardKitC"]
),
.target(
name: "WireGuardKitC",