#native #event-source #web #sse #portable

spinta

Server-sent events client that works natively and on the web (WASM)

6 releases

0.1.5 Jan 6, 2023
0.1.4 Dec 13, 2022

#704 in WebAssembly

Download history 1/week @ 2024-03-20 1/week @ 2024-03-27 2/week @ 2024-04-03 69/week @ 2024-05-29 9/week @ 2024-06-05

76 downloads per month

MIT/Apache

15KB
144 lines

spinta

This is a simple Server-sent events client for Rust which can be compiled to both native and web (WASM).

Usage

let receiver = spinta::connect("http://example.com").unwrap();
while let Some(event) = receiver.try_recv() {
    println!("Received {:?}", event);
}

lib.rs:

A Server-sent events client library that can be compiled to both native and the web (WASM).

Usage:

let receiver = spinta::connect("http://example.com").unwrap();
while let Some(event) = receiver.try_recv() {
    println!("Received {:?}", event);
}

Dependencies

~7–21MB
~267K SLoC