A better Rust ATProto crate

update documentation for streaming support

Orual 00896156 7da32bff

+56
+11
README.md
··· 22 22 - Use as much or as little from the crates as you need 23 23 24 24 25 + ### Streaming Support 26 + 27 + Jacquard supports efficient streaming for large payloads: 28 + 29 + - **Blob uploads/downloads**: Stream media without loading into memory 30 + - **CAR file streaming**: Efficient repo sync operations 31 + - **Thin forwarding**: Pipe data between endpoints 32 + - **WebSocket support**: Bidirectional streaming connections 33 + 34 + Enable with the `streaming` feature flag. See `jacquard-common` documentation for details. 35 + 25 36 ## Example 26 37 27 38 Dead simple API client. Logs in with OAuth and prints the latest 5 posts from your timeline.
+45
crates/jacquard-common/README.md
··· 1 + # jacquard-common 2 + 3 + Core AT Protocol types and HTTP client abstraction for Jacquard. 4 + 5 + ## Features 6 + 7 + ### `streaming` (optional) 8 + 9 + Adds support for streaming HTTP request and response bodies: 10 + 11 + - `ByteStream` / `ByteSink`: Platform-agnostic stream abstractions 12 + - `HttpClientExt`: Streaming methods for HTTP client 13 + - `StreamingResponse`: XRPC streaming response wrapper 14 + - Error types: `StreamError` with `StreamErrorKind` 15 + 16 + Works on both native and WASM targets via `n0-future`. 17 + 18 + **Example:** 19 + ```rust 20 + use jacquard_common::http_client::{HttpClient, HttpClientExt}; 21 + use futures::StreamExt; 22 + 23 + let client = reqwest::Client::new(); 24 + let response = client.send_http_streaming(request).await?; 25 + 26 + let stream = response.into_parts().1.into_inner(); 27 + futures::pin_mut!(stream); 28 + while let Some(chunk) = stream.next().await { 29 + // Process streaming chunks 30 + } 31 + ``` 32 + 33 + ### `websocket` (optional) 34 + 35 + Adds WebSocket client abstraction: 36 + 37 + - `WebSocketClient` trait 38 + - `WebSocketConnection` with bidirectional streams 39 + - Uses same `ByteStream`/`ByteSink` as HTTP streaming 40 + 41 + Requires the `streaming` feature. 42 + 43 + ### `reqwest-client` (optional) 44 + 45 + Implements `HttpClient` and `HttpClientExt` for `reqwest::Client`.