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
+4
View File
@@ -4,6 +4,10 @@
import Network
import Foundation
#if SWIFT_PACKAGE
import WireGuardKitTypes
#endif
enum DNSResolver {}
extension DNSResolver {
@@ -6,7 +6,7 @@ import Network
import NetworkExtension
#if SWIFT_PACKAGE
import WireGuardKitC
import WireGuardKitTypes
#endif
/// A type alias for `Result` type that holds a tuple with source and resolved endpoint.
@@ -7,6 +7,7 @@ import NetworkExtension
#if SWIFT_PACKAGE
import WireGuardKitGo
import WireGuardKitC
import WireGuardKitTypes
#endif
public enum WireGuardAdapterError: Error {