Skip to content

Commit 80dd6e6

Browse files
authored
Merge pull request #25 from sideeffect-io/improve/install-instructions
project: add install instructions
2 parents 8718971 + b75060e commit 80dd6e6

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,30 @@
1111

1212
**AsyncExtensions** can be seen as a companion to Apple [swift-async-algorithms](https://github.com/apple/swift-async-algorithms). For now there is an overlap between both libraries, but when **swift-async-algorithms** becomes stable the overlapping operators while be deprecated in **AsyncExtensions**. Nevertheless **AsyncExtensions** will continue to provide the operators that the community needs and are not provided by Apple.
1313

14+
## Adding AsyncExtensions as a Dependency
15+
16+
To use the `AsyncExtensions` library in a SwiftPM project,
17+
add the following line to the dependencies in your `Package.swift` file:
18+
19+
```swift
20+
.package(url: "https://github.com/sideeffect-io/AsyncExtensions"),
21+
```
22+
23+
Include `"AsyncExtensions"` as a dependency for your executable target:
24+
25+
```swift
26+
.target(name: "<target>", dependencies: ["AsyncExtensions"]),
27+
```
28+
29+
Finally, add `import AsyncExtensions` to your source code.
30+
1431
### Channels
15-
* [AsyncBufferedChannel](./Sources/AsyncChannels/AsyncBufferedChannel.swift): Buffered communication channel between tasks
32+
* [AsyncBufferedChannel](./Sources/AsyncChannels/AsyncBufferedChannel.swift): Buffered communication channel between tasks. The elements are not shared and will be spread across consumers (same as
33+
AsyncStream)
1634
* [AsyncThrowingBufferedChannel](./Sources/AsyncChannels/AsyncThrowingBufferedChannel.swift): Throwing buffered communication channel between tasks
1735

1836
### Subjects
19-
* [AsyncPassthroughSubject](./Sources/AsyncSubjects/AsyncPassthroughSubject.swift): Subject with a shared output. The elements are not shared and will be spread across consumers (same as AsyncStream)
37+
* [AsyncPassthroughSubject](./Sources/AsyncSubjects/AsyncPassthroughSubject.swift): Subject with a shared output
2038
* [AsyncThrowingPassthroughSubject](./Sources/AsyncSubjects/AsyncThrowingPassthroughSubject.swift): Throwing subject with a shared output
2139
* [AsyncCurrentValueSubject](./Sources/AsyncSubjects/AsyncCurrentValueSubject.swift): Subject with a shared output. Maintain an replays its current value
2240
* [AsyncThrowingCurrentValueSubject](./Sources/AsyncSubjects/AsyncThrowingCurrentValueSubject.swift): Throwing subject with a shared output. Maintain an replays its current value

0 commit comments

Comments
 (0)