-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPackage.swift
More file actions
106 lines (103 loc) · 4.74 KB
/
Package.swift
File metadata and controls
106 lines (103 loc) · 4.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// swift-tools-version:6.2
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift HTTP Server open source project
//
// Copyright (c) 2025 Apple Inc. and the Swift HTTP Server project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Swift HTTP Server project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import PackageDescription
let extraSettings: [SwiftSetting] = [
.enableExperimentalFeature("SuppressedAssociatedTypes"),
.enableExperimentalFeature("LifetimeDependence"),
.enableExperimentalFeature("Lifetimes"),
.enableUpcomingFeature("LifetimeDependence"),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableUpcomingFeature("InferIsolatedConformances"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("MemberImportVisibility"),
.enableUpcomingFeature("InternalImportsByDefault"),
]
let package = Package(
name: "swift-http-server",
products: [
.library(
name: "NIOHTTPServer",
targets: ["NIOHTTPServer"]
)
],
traits: [
.trait(name: "Configuration"),
.default(enabledTraits: ["Configuration"]),
],
dependencies: [
.package(
url: "https://github.com/apple/swift-http-api-proposal.git",
branch: "2cb0ef6722e2086a04b5a14c0c40971b8038099a"
),
.package(url: "https://github.com/apple/swift-http-types.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-distributed-tracing.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-certificates.git", from: "1.16.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.92.2"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.36.0"),
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.30.0"),
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.40.0"),
.package(url: "https://github.com/apple/swift-configuration.git", from: "1.0.0"),
.package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.10.0"),
],
targets: [
.executableTarget(
name: "Example",
dependencies: [
.product(name: "HTTPTypes", package: "swift-http-types"),
.product(name: "Tracing", package: "swift-distributed-tracing"),
.product(name: "Instrumentation", package: "swift-distributed-tracing"),
.product(name: "Logging", package: "swift-log"),
.product(name: "HTTPAPIs", package: "swift-http-api-proposal"),
"NIOHTTPServer",
],
swiftSettings: extraSettings
),
.target(
name: "NIOHTTPServer",
dependencies: [
.product(name: "AsyncStreaming", package: "swift-http-api-proposal"),
.product(name: "X509", package: "swift-certificates"),
.product(name: "HTTPTypes", package: "swift-http-types"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
.product(name: "NIOHTTP2", package: "swift-nio-http2"),
.product(name: "NIOSSL", package: "swift-nio-ssl"),
.product(name: "Logging", package: "swift-log"),
.product(name: "NIOHTTPTypesHTTP1", package: "swift-nio-extras"),
.product(name: "NIOHTTPTypesHTTP2", package: "swift-nio-extras"),
.product(name: "NIOCertificateReloading", package: "swift-nio-extras"),
.product(
name: "Configuration",
package: "swift-configuration",
condition: .when(traits: ["Configuration"])
),
.product(name: "NIOExtras", package: "swift-nio-extras"),
.product(name: "HTTPAPIs", package: "swift-http-api-proposal"),
],
swiftSettings: extraSettings
),
.testTarget(
name: "NIOHTTPServerTests",
dependencies: [
.product(name: "Logging", package: "swift-log"),
.product(name: "ServiceLifecycle", package: "swift-service-lifecycle"),
.product(name: "ServiceLifecycleTestKit", package: "swift-service-lifecycle"),
"NIOHTTPServer",
]
),
]
)