# pushwire
Generic, multiplexed push protocol for real-time applications.
This is the umbrella crate that re-exports the pushwire sub-crates. Use this for convenience instead of depending on each sub-crate individually.
## Installation
```bash
# Client only (default)
cargo add pushwire
# Server
cargo add pushwire -F server
# Both client and server
cargo add pushwire -F server,client
```
## Sub-crates
| [pushwire-core](https://crates.io/crates/pushwire-core) | Shared types, binary codec, delta algorithm, fragment assembler |
| [pushwire-server](https://crates.io/crates/pushwire-server) | Axum-based push server with WebSocket + SSE transports |
| [pushwire-client](https://crates.io/crates/pushwire-client) | Async client with auto-reconnect, cursor tracking, channel dispatch |
## Usage
```rust
use pushwire::{ChannelKind, Frame};
// Core types are always available
let frame: Frame<MyChannel> = Frame::new(MyChannel::Chat, serde_json::json!({"msg": "hi"}));
// Client (enabled by default)
use pushwire::pushwire_client::{ClientConfig, PushClient};
// Server (requires `server` feature)
use pushwire::pushwire_server::PushServer;
```
## Feature flags
| `client` | yes | Re-exports `pushwire-client` |
| `server` | no | Re-exports `pushwire-server` |
## Protocol highlights
- **Generic channel system** — define your own channels via `ChannelKind` trait
- **Cursor-based reliable delivery** — resume after disconnect without message loss
- **Priority queuing** — high/normal/low priority lanes per channel
- **Binary framing** — MessagePack or CBOR encoding with zstd compression
- **Fragment assembly** — large payloads split and reassembled transparently
- **Delta algorithm** — SHA-256 gated incremental updates
- **WebSocket + SSE transports** — automatic fallback
- **WebRTC signaling** — optional peer-to-peer signaling relay
## License
Apache-2.0