https://github.com/cypherpoet/netstack
A concurrency-based networking stack for modern Swift projects. Use as-is — or as a starting point for your own utilities.
https://github.com/cypherpoet/netstack
swift swift-networking swift-package-manager swift-packages swiftui
Last synced: 3 months ago
JSON representation
A concurrency-based networking stack for modern Swift projects. Use as-is — or as a starting point for your own utilities.
- Host: GitHub
- URL: https://github.com/cypherpoet/netstack
- Owner: CypherPoet
- License: mit
- Created: 2020-07-07T21:21:24.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-09T01:48:40.000Z (over 4 years ago)
- Last Synced: 2025-01-17T21:09:39.647Z (12 months ago)
- Topics: swift, swift-networking, swift-package-manager, swift-packages, swiftui
- Language: Swift
- Homepage:
- Size: 2.55 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# NetStack 🛰
_A concurrency-based networking stack for modern Swift projects. Use as-is — or as a starting point for your own utilities._
## Features
- ✅ Composable, async-enabled primitives for performing network operations with `Data` and transforming `Codable` types.
- ✅ Utilities for `URLRequest` configuration.
- ✅ Utilities for mocking `URLRequest` responses in tests.
## Installation
`NetStack` ships with two [library products](https://developer.apple.com/documentation/swift_packages/product): `NetStack` and `NetStackTestUtils`.
### Xcode Projects
Select `File` -> `Swift Packages` -> `Add Package Dependency` and enter `https://github.com/CypherPoet/NetStack`.
### Swift Package Manager Projects
You can add `CypherPoetNetStack` as a package dependency in your `Package.swift` file:
```swift
let package = Package(
//...
dependencies: [
.package(
name: "CypherPoetNetStack",
url: "https://github.com/CypherPoet/NetStack",
.exact("0.0.6")
),
],
//...
)
```
From there, refer to the `NetStack` "product" delivered by the `CypherPoetNetStack` "package" inside of any of your project's target dependencies:
```swift
targets: [
.target(
name: "YourLibrary",
dependencies: [
.product(
name: "NetStack",
package: "CypherPoetNetStack"
),
],
...
),
...
]
```
Then simply `import NetStack` wherever you’d like to use it.
## Usage
### Projects Using NetStack
-
## Contributing
Contributions to `NetStack` are most welcome. Check out some of the [issue templates](./.github/ISSUE_TEMPLATE/) for more info.
## 💻 Developing
### Requirements
- Xcode 13.0+
### 📜 Creating & Building Documentation
Documentation is built with [Xcode's DocC](https://developer.apple.com/documentation/docc). See [Apple's guidance on how to build, run, and create DocC content](https://developer.apple.com/documentation/docc/api-reference-syntax).
For now, the best way to view the docs is to open the project in Xcode and run the `Build Documentation` command. At some point in the future, I'm hoping to leverage the tooling the develops for generating/hosting DocC documentation. (Please feel free to let me know if you have any ideas or tooling recommendations around this 🙂).
## 🏷 License
`NetStack` is available under the MIT license. See the [LICENSE file](./LICENSE) for more info.