atrium
atrium copied to clipboard
atrium-streams + atrium-streams-client implementation
This Pull Request adds two new crates:
- atrium-streams: Definitions for traits, types and utilities for dealing with event stream subscriptions.
-
atrium-streams-client: A library that provides default implementations of the
EventStreamClient
,Handlers
andSubscription
defined in atrium-streams for interacting with the variety of subscriptions in ATProto.
TODO:
- [x] - Implement processing of other payload types for
Firehose
implementation + add configurations to manually enable payload types to avoid unnecessary computations; - [x] - Write unit tests;
- [ ] - Implement other subscriptions, such as
com.atproto.label.subscribeLabels
+ tests; - [ ] - Implement an alternative client for codebases that do not use Tokio as an asynchronous runtime + tests.
- [ ] - Create crate features so that users can deactivate specific features;
- [ ] - Write CHANGELOG.md and README.md;
- [ ] - Write Github Workflows for both crates + test features;
- [ ] - Prepare for wasm target;
- [ ] - Using
std::mem::transmute
is not recommended. It works wonderfully for now, but eventually it might not anymore. Think of a way to replace the outdated rs_car crate somehow (if possible).