[package] name = "spinta" version = "0.1.5" authors = ["Fireyy Zhu "] description = "Server-sent events client that works natively and on the web (WASM)" edition = "2021" rust-version = "1.60" license = "MIT OR Apache-2.0" homepage = "https://github.com/fireyy/spinta" repository = "https://github.com/fireyy/spinta" categories = ["web-programming", "wasm"] keywords = ["sse", "eventsource", "portable", "native", "web"] include = ["LICENSE-APACHE", "LICENSE-MIT", "**/*.rs", "Cargo.toml"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] futures = "0.3.21" tracing = "0.1" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] eventsource-client = { version = "0.11.0" } tokio = { version = "1.16", features = ["rt", "sync"] } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = "0.2" js-sys = "0.3" wasm-bindgen-futures = "0.4" [dependencies.web-sys] version = "0.3" features = [ 'Event', 'ErrorEvent', 'EventSource', 'EventSourceInit', 'EventListener', 'MessageEvent', ] [dev-dependencies] tokio = { version = "1.2.0", features = ["macros", "rt-multi-thread"] } [[example]] name = "demo"