#sse #eventsource #portable #native #web

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

#503 in WebAssembly

26 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–20MB
~266K SLoC