#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

#684 in WebAssembly

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