Skip to content

Commit e7df54c

Browse files
committed
initial adoption of DocC based documentaiton
motivation: use DocC for docs change: * add DocC catalog to NIO target, as the "landing page" * remove jazzy doc generation script * add Package.swift with tools-version 5.6 so that DocC can be used, and add a dependency on the DocC plugin * udpate soundness script
1 parent dd40215 commit e7df54c

File tree

4 files changed

+332
-128
lines changed

4 files changed

+332
-128
lines changed

[email protected]

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
// swift-tools-version:5.6
2+
//===----------------------------------------------------------------------===//
3+
//
4+
// This source file is part of the SwiftNIO open source project
5+
//
6+
// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors
7+
// Licensed under Apache License v2.0
8+
//
9+
// See LICENSE.txt for license information
10+
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
11+
//
12+
// SPDX-License-Identifier: Apache-2.0
13+
//
14+
//===----------------------------------------------------------------------===//
15+
16+
import PackageDescription
17+
18+
let swiftAtomics: PackageDescription.Target.Dependency = .product(name: "Atomics", package: "swift-atomics")
19+
20+
var targets: [PackageDescription.Target] = [
21+
.target(name: "NIOCore",
22+
dependencies: ["NIOConcurrencyHelpers", "CNIOLinux", "CNIOWindows"]),
23+
.target(name: "_NIODataStructures"),
24+
.target(name: "NIOEmbedded",
25+
dependencies: ["NIOCore",
26+
"NIOConcurrencyHelpers",
27+
"_NIODataStructures",
28+
swiftAtomics]),
29+
.target(name: "NIOPosix",
30+
dependencies: ["CNIOLinux",
31+
"CNIODarwin",
32+
"CNIOWindows",
33+
"NIOConcurrencyHelpers",
34+
"NIOCore",
35+
"_NIODataStructures",
36+
swiftAtomics]),
37+
.target(name: "NIO",
38+
dependencies: ["NIOCore",
39+
"NIOEmbedded",
40+
"NIOPosix"]),
41+
.target(name: "_NIOConcurrency",
42+
dependencies: ["NIO", "NIOCore"]),
43+
.target(name: "_NIOBeta",
44+
dependencies: ["NIOCore"]),
45+
.target(name: "NIOFoundationCompat", dependencies: ["NIO", "NIOCore"]),
46+
.target(name: "CNIOAtomics", dependencies: []),
47+
.target(name: "CNIOSHA1", dependencies: []),
48+
.target(name: "CNIOLinux", dependencies: []),
49+
.target(name: "CNIODarwin", dependencies: [], cSettings: [.define("__APPLE_USE_RFC_3542")]),
50+
.target(name: "CNIOWindows", dependencies: []),
51+
.target(name: "NIOConcurrencyHelpers",
52+
dependencies: ["CNIOAtomics"]),
53+
.target(name: "NIOHTTP1",
54+
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers", "CNIOHTTPParser"]),
55+
.executableTarget(name: "NIOEchoServer",
56+
dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"],
57+
exclude: ["README.md"]),
58+
.executableTarget(name: "NIOEchoClient",
59+
dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"],
60+
exclude: ["README.md"]),
61+
.executableTarget(name: "NIOHTTP1Server",
62+
dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOConcurrencyHelpers"],
63+
exclude: ["README.md"]),
64+
.executableTarget(name: "NIOHTTP1Client",
65+
dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOConcurrencyHelpers"],
66+
exclude: ["README.md"]),
67+
.target(name: "CNIOHTTPParser"),
68+
.target(name: "NIOTLS", dependencies: ["NIO", "NIOCore"]),
69+
.executableTarget(name: "NIOChatServer",
70+
dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"],
71+
exclude: ["README.md"]),
72+
.executableTarget(name: "NIOChatClient",
73+
dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"],
74+
exclude: ["README.md"]),
75+
.target(name: "NIOWebSocket",
76+
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "CNIOSHA1"]),
77+
.executableTarget(name: "NIOWebSocketServer",
78+
dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOWebSocket"],
79+
exclude: ["README.md"]),
80+
.executableTarget(name: "NIOWebSocketClient",
81+
dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOWebSocket"],
82+
exclude: ["README.md"]),
83+
.executableTarget(name: "NIOPerformanceTester",
84+
dependencies: ["NIOPosix", "NIOCore", "NIOEmbedded", "NIOHTTP1", "NIOFoundationCompat", "NIOWebSocket"]),
85+
.executableTarget(name: "NIOMulticastChat",
86+
dependencies: ["NIOPosix", "NIOCore"]),
87+
.executableTarget(name: "NIOUDPEchoServer",
88+
dependencies: ["NIOPosix", "NIOCore"],
89+
exclude: ["README.md"]),
90+
.executableTarget(name: "NIOUDPEchoClient",
91+
dependencies: ["NIOPosix", "NIOCore"],
92+
exclude: ["README.md"]),
93+
.target(name: "NIOTestUtils",
94+
dependencies: ["NIOPosix", "NIOCore", "NIOEmbedded", "NIOHTTP1", swiftAtomics]),
95+
.executableTarget(name: "NIOCrashTester",
96+
dependencies: ["NIOPosix", "NIOCore", "NIOEmbedded", "NIOHTTP1", "NIOWebSocket", "NIOFoundationCompat"]),
97+
.executableTarget(name: "NIOAsyncAwaitDemo",
98+
dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1"]),
99+
.testTarget(name: "NIOCoreTests",
100+
dependencies: ["NIOCore", "NIOEmbedded", "NIOFoundationCompat"]),
101+
.testTarget(name: "NIOBetaTests",
102+
dependencies: ["_NIOBeta"]),
103+
.testTarget(name: "NIOEmbeddedTests",
104+
dependencies: ["NIOConcurrencyHelpers", "NIOCore", "NIOEmbedded"]),
105+
.testTarget(name: "NIOPosixTests",
106+
dependencies: ["NIOPosix", "NIOCore", "NIOFoundationCompat", "NIOTestUtils", "NIOConcurrencyHelpers", "NIOEmbedded"]),
107+
.testTarget(name: "NIOConcurrencyHelpersTests",
108+
dependencies: ["NIOConcurrencyHelpers", "NIOCore"]),
109+
.testTarget(name: "NIODataStructuresTests",
110+
dependencies: ["_NIODataStructures"]),
111+
.testTarget(name: "NIOHTTP1Tests",
112+
dependencies: ["NIOCore", "NIOEmbedded", "NIOPosix", "NIOHTTP1", "NIOFoundationCompat", "NIOTestUtils"]),
113+
.testTarget(name: "NIOTLSTests",
114+
dependencies: ["NIOCore", "NIOEmbedded", "NIOTLS", "NIOFoundationCompat"]),
115+
.testTarget(name: "NIOWebSocketTests",
116+
dependencies: ["NIOCore", "NIOEmbedded", "NIOWebSocket"]),
117+
.testTarget(name: "NIOTestUtilsTests",
118+
dependencies: ["NIOTestUtils", "NIOCore", "NIOEmbedded", "NIOPosix"]),
119+
.testTarget(name: "NIOFoundationCompatTests",
120+
dependencies: ["NIOCore", "NIOFoundationCompat"]),
121+
.testTarget(name: "NIOTests",
122+
dependencies: ["NIO"]),
123+
]
124+
125+
let package = Package(
126+
name: "swift-nio",
127+
products: [
128+
.library(name: "NIOCore", targets: ["NIOCore"]),
129+
.library(name: "NIO", targets: ["NIO"]),
130+
.library(name: "NIOEmbedded", targets: ["NIOEmbedded"]),
131+
.library(name: "NIOPosix", targets: ["NIOPosix"]),
132+
.library(name: "_NIOConcurrency", targets: ["_NIOConcurrency"]),
133+
.library(name: "_NIOBeta", targets: ["_NIOBeta"]),
134+
.library(name: "NIOTLS", targets: ["NIOTLS"]),
135+
.library(name: "NIOHTTP1", targets: ["NIOHTTP1"]),
136+
.library(name: "NIOConcurrencyHelpers", targets: ["NIOConcurrencyHelpers"]),
137+
.library(name: "NIOFoundationCompat", targets: ["NIOFoundationCompat"]),
138+
.library(name: "NIOWebSocket", targets: ["NIOWebSocket"]),
139+
.library(name: "NIOTestUtils", targets: ["NIOTestUtils"]),
140+
],
141+
dependencies: [
142+
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"),
143+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
144+
],
145+
targets: targets
146+
)

0 commit comments

Comments
 (0)