Răsfoiți Sursa

Add README, docs and .spi.yml (#9)

George Barnett 1 an în urmă
părinte
comite
54ce64bc3b
6 a modificat fișierele cu 51 adăugiri și 63 ștergeri
  1. 7 0
      .spi.yml
  2. 3 18
      CONTRIBUTING.md
  3. 1 1
      Package.swift
  4. 18 0
      README.md
  5. 2 44
      SECURITY.md
  6. 20 0
      Sources/GRPCNIOTransportHTTP2/Documentation.docc/Documentation.md

+ 7 - 0
.spi.yml

@@ -0,0 +1,7 @@
+version: 1
+builder:
+  configs:
+    - documentation_targets: [GRPCNIOTransportHTTP2, GRPCNIOTransportHTTP2Posix, GRPCNIOTransportHTTP2TransportServices]
+      swift_version: 6.0
+      # Don't include @_exported types from GRPCCore
+      custom_documentation_parameters: [--exclude-extended-types]

+ 3 - 18
CONTRIBUTING.md

@@ -1,19 +1,4 @@
-# How to contribute
+# Contributing
 
-We definitely welcome patches and contributions to grpc-swift! Please read the gRPC
-organization's [governance rules](https://github.com/grpc/grpc-community/blob/main/governance.md)
-and [contribution guidelines](https://github.com/grpc/grpc-community/blob/main/CONTRIBUTING.md) before proceeding.
-
-Here are some guidelines and information about how to participate.
-
-## Getting started
-
-### Legal requirements
-
-In order to protect both you and ourselves, you will need to sign the
-[Contributor License Agreement](https://identity.linuxfoundation.org/projects/cncf).
-
-### Technical requirements
-
-Please see the [main gRPC repository](https://github.com/grpc/grpc) for
-more information about gRPC.
+Please refer to the contributing guide in the
+[`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository.

+ 1 - 1
Package.swift

@@ -75,7 +75,7 @@ let targets: [Target] = [
     ]
   ),
 
-  // Core module containing shared compionents for the NIOPosix and NIOTS variants.
+  // Core module containing shared components for the NIOPosix and NIOTS variants.
   .target(
     name: "GRPCNIOTransportCore",
     dependencies: [

+ 18 - 0
README.md

@@ -0,0 +1,18 @@
+# gRPC Swift NIO Transport
+
+This repository contains high-performance HTTP/2 client and server transport
+implementations for [gRPC Swift][gh-grpc-swift] built on top of
+[SwiftNIO][gh-swift-nio].
+
+- 📚 **Documentation** is available on the [Swift Package Index][spi-grpc-swift-nio-transport]
+- 🎓 **Tutorials** are available in the documentation for `grpc/grpc-swift` on
+  the [Swift Package Index][spi-grpc-swift].
+- 💻 **Examples** are available in the `Examples` directory of the
+  [`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository
+- 🚀 **Contributions** are welcome, please see [CONTRIBUTING.md](CONTRIBUTING.md)
+- 🪪 **License** is Apache 2.0, repeated in [LICENSE](License)
+- 🔒 **Security** issues should be reported via the process in [SECURITY.md](SECURITY.md)
+
+[gh-swift-nio]: https://github.com/apple/swift-nio
+[gh-grpc-swift]: https://github.com/grpc/grpc-swift
+[spi-grpc-swift-nio-transport]: https://swiftpackageindex.com/grpc/grpc-swift-nio-transport/documentation

+ 2 - 44
SECURITY.md

@@ -1,46 +1,4 @@
 # Security
 
-This document specifies the security process for gRPC Swift.
-
-## Disclosures
-
-### Private Disclosure Process
-
-The gRPC Swift team asks that known and suspected vulnerabilities be
-privately and responsibly disclosed by emailing
-[grpc-swift-security@group.apple.com](mailto:grpc-swift-security@group.apple.com)
-with the [details usually included with bug reports][issue-template].
-**Do not file a public issue.**
-
-#### When to report a vulnerability
-
-* You think you have discovered a potential security vulnerability in gRPC
-  Swift.
-* You are unsure how a vulnerability affects gRPC Swift.
-
-#### What happens next?
-
-* A member of the team will acknowledge receipt of the report within 3
-  working days (United Kingdom). This may include a request for additional
-  information about reproducing the vulnerability.
-* We will privately inform the Swift Server Work Group ([SSWG][sswg]) of the
-  vulnerability within 10 days of the report as per their [security
-  guidelines][sswg-security].
-* Once we have identified a fix we may ask you to validate it. We aim to do this
-  within 30 days. In some cases this may not be possible, for example when the
-  vulnerability exists at the protocol level and the industry must coordinate on
-  the disclosure process.
-* If a CVE number is required, one will be requested from [MITRE][mitre]
-  providing you with full credit for the discovery.
-* We will decide on a planned release date and let you know when it is.
-* Prior to release, we will inform major dependents that a security-related
-  patch is impending.
-* Once the fix has been released we will publish a security advisory on GitHub
-  and the [SSWG][sswg] will announce the vulnerability on the [Swift
-  forums][swift-forums-sec].
-
-[issue-template]: https://github.com/grpc/grpc-swift/blob/main/.github/ISSUE_TEMPLATE/BUG_REPORT.md
-[sswg]: https://github.com/swift-server/sswg
-[sswg-security]: https://github.com/swift-server/sswg/blob/main/process/incubation.md#security-best-practices
-[swift-forums-sec]: https://forums.swift.org/c/server/security-updates/
-[mitre]: https://cveform.mitre.org/
+Please refer to [SECURITY.md] in the
+[`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository.

+ 20 - 0
Sources/GRPCNIOTransportHTTP2/Documentation.docc/Documentation.md

@@ -0,0 +1,20 @@
+# ``GRPCNIOTransportHTTP2``
+
+An umbrella module providing high-performance HTTP/2 client and server transport
+implementations built on top of SwiftNIO.
+
+The module provides two variants of the client and server transport which differ in the
+networking backend used by each. The two backends are:
+
+1. `NIOPosix`, and
+2. `NIOTransportServices`.
+
+These correspond to two different modules provided by `grpc-swift-nio-transport`:
+
+1. [`GRPCNIOTransportHTTP2Posix`](https://swiftpackageindex.com/grpc/grpc-swift-nio-transport/documentation/grpcniotransporthttp2posix), and
+2. [`GRPCNIOTransportHTTP2TransportServices`](https://swiftpackageindex.com/grpc/grpc-swift-nio-transport/documentation/grpcniotransporthttp2transportservices).
+
+This module, ``GRPCNIOTransportHTTP2``, re-exports the contents of both of these modules.
+
+`GRPCNIOTransportHTTP2Posix` is available on all platforms, while
+`GRPCNIOTransportHTTP2TransportServices` is only available on Darwin based platforms.