#sse #native #event-source #web #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

#919 in WebAssembly

25 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

~8–19MB
~267K SLoC