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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user