-
Notifications
You must be signed in to change notification settings - Fork 434
Update tutorials and docs #2070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
566bc17
Update tutorials and docs
glbrntt 8391571
Update Sources/GRPCCore/Documentation.docc/Documentation.md
glbrntt 0ce9598
Add links in docs, mention tutorials
glbrntt 1eec6f3
Merge remote-tracking branch 'upstream/main' into v2/fix-docs
glbrntt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
version: 1 | ||
builder: | ||
configs: | ||
- documentation_targets: [GRPC, GRPCReflectionService, protoc-gen-grpc-swift, GRPCCore] | ||
- documentation_targets: [GRPCCore, GRPCCodeGen] | ||
swift_version: 6.0 | ||
- documentation_targets: [GRPCInProcessTransport] | ||
swift_version: 6.0 | ||
# Don't include @_exported types from GRPCCore | ||
custom_documentation_parameters: [--exclude-extended-types] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,47 @@ | ||
# gRPC Swift | ||
|
||
This repository contains a gRPC code generator and runtime libraries for Swift. | ||
You can read more about gRPC on the [gRPC project's website][grpcio]. | ||
|
||
## Versions | ||
|
||
gRPC Swift is currently undergoing active development to take full advantage of | ||
Swift's native concurrency features. The culmination of this work will be a new | ||
major version, v2.x. Pre-release versions will be available in the near future. | ||
|
||
In the meantime, v1.x is available and still supported. You can read more about | ||
it on the [Swift Package Index][spi-grpc-swift-main]. | ||
|
||
## Security | ||
|
||
Please see [SECURITY.md](SECURITY.md). | ||
|
||
## License | ||
|
||
gRPC Swift is released under the same license as [gRPC][gh-grpc], repeated in | ||
[LICENSE](LICENSE). | ||
|
||
## Contributing | ||
|
||
Please get involved! See our [guidelines for contributing](CONTRIBUTING.md). | ||
This repository contains a gRPC implementation for Swift. You can read more | ||
about gRPC on the [gRPC project's website][grpcio]. | ||
|
||
> gRPC Swift v2.x is under active development on the `main` branch and takes | ||
> full advantage of Swift's native concurrency features. | ||
> | ||
> v1.x is still supported and maintained on the `release/1.x` branch. | ||
|
||
- 📚 **Documentation** and **tutorials** are available on the [Swift Package Index][spi-grpc-swift] | ||
- 💻 **Examples** are available in the [Examples](Examples) directory | ||
- 🚀 **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) | ||
|
||
## Quick Start | ||
|
||
The following snippet contains a Swift Package manifest to use gRPC Swift v2.x with | ||
the SwiftNIO based transport and SwiftProtobuf serialization: | ||
|
||
```swift | ||
// swift-tools-version: 6.0 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "foo-package", | ||
platforms: [.macOS("15.0")], | ||
dependencies: [ | ||
.package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-alpha.1"), | ||
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-alpha.1"), | ||
], | ||
targets: [ | ||
.executableTarget( | ||
name: "bar-target", | ||
dependencies: [ | ||
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), | ||
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), | ||
] | ||
) | ||
] | ||
) | ||
``` | ||
|
||
[gh-grpc]: https://github.com/grpc/grpc | ||
[grpcio]: https://grpc.io | ||
[spi-grpc-swift-main]: https://swiftpackageindex.com/grpc/grpc-swift/main/documentation/grpccore | ||
[spi-grpc-swift]: https://swiftpackageindex.com/grpc/grpc-swift/documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...RPCCore/Documentation.docc/Tutorials/Hello-World/Resources/hello-world-sec04-step01.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe link to the hello world tutorial from the Quick Start section, maybe below the Package.swift? I'm thinking, someone may come in wanting to play with this, copy the manifest, and then might struggle a bit clicking around documentations on SPI. Having the link to the tutorial directly may make things slightly easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's a good point. I'd like the README to remain really focused by just having the bullet points (the manifest is the exception because it's easy to copy and paste). What if we add a "Tutorials" bullet to the list above between Documentation and Examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up just mentioning tutorials in the documentation point above as they link to the same place.