diff --git a/README.md b/README.md index a5ec640..deabde6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -[examples-url]: https://github.com/shellrow/websock/tree/main/websock/examples +[crates-badge]: https://img.shields.io/crates/v/websock.svg +[crates-url]: https://crates.io/crates/websock [doc-url]: https://docs.rs/websock/latest/websock +[license-badge]: https://img.shields.io/crates/l/websock.svg +[examples-url]: https://github.com/foctal/websock/tree/main/websock/examples -# websock +# websock [![Crates.io][crates-badge]][crates-url] ![License][license-badge] A minimal WebSocket library for native and WebAssembly. @@ -28,4 +31,4 @@ See [examples][examples-url]. ### WebAssembly -The `websock-wasm-demo` crate contains a small browser demo that connects to a echo server. +The `websock-wasm-demo` crate contains a small browser demo that connects to an echo server. diff --git a/websock-proto/Cargo.toml b/websock-proto/Cargo.toml index e6d0a25..0abbb26 100644 --- a/websock-proto/Cargo.toml +++ b/websock-proto/Cargo.toml @@ -3,6 +3,12 @@ name = "websock-proto" version.workspace = true edition.workspace = true authors.workspace = true +description = "Protocol-level primitives shared across websock transports." +repository = "https://github.com/foctal/websock" +readme = "../README.md" +keywords = ["network", "websocket"] +categories = ["network-programming", "web-programming"] +license = "MIT" [dependencies] bytes = { workspace = true } diff --git a/websock-tungstenite/Cargo.toml b/websock-tungstenite/Cargo.toml index a1b2549..2c3455d 100644 --- a/websock-tungstenite/Cargo.toml +++ b/websock-tungstenite/Cargo.toml @@ -3,6 +3,12 @@ name = "websock-tungstenite" version.workspace = true edition.workspace = true authors.workspace = true +description = "Native transport implementation based on tokio-tungstenite." +repository = "https://github.com/foctal/websock" +readme = "../README.md" +keywords = ["network", "websocket", "native"] +categories = ["network-programming", "web-programming"] +license = "MIT" [dependencies] websock-proto = { workspace = true } diff --git a/websock-tungstenite/src/lib.rs b/websock-tungstenite/src/lib.rs index 5a7c2a7..fb9bf03 100644 --- a/websock-tungstenite/src/lib.rs +++ b/websock-tungstenite/src/lib.rs @@ -1,7 +1,4 @@ -//! Native transport implementation based on Tokio Tungstenite. -//! -//! Use this crate on non-wasm targets. The `stream` feature exposes -//! a `Sink`/`Stream` split API for message-oriented workflows. +//! Native transport implementation based on tokio-tungstenite. mod builder; mod connection; diff --git a/websock-wasm-demo/Cargo.toml b/websock-wasm-demo/Cargo.toml index 0fd3a7a..b10e7dd 100644 --- a/websock-wasm-demo/Cargo.toml +++ b/websock-wasm-demo/Cargo.toml @@ -3,6 +3,7 @@ name = "websock-wasm-demo" version.workspace = true edition.workspace = true authors.workspace = true +publish = false [lib] crate-type = ["cdylib"] diff --git a/websock-wasm/Cargo.toml b/websock-wasm/Cargo.toml index 2eaeb75..4a0553c 100644 --- a/websock-wasm/Cargo.toml +++ b/websock-wasm/Cargo.toml @@ -3,6 +3,12 @@ name = "websock-wasm" version.workspace = true edition.workspace = true authors.workspace = true +description = "WebAssembly transport implementation for browser-based WebSockets." +repository = "https://github.com/foctal/websock" +readme = "../README.md" +keywords = ["network", "websocket", "wasm"] +categories = ["network-programming", "web-programming"] +license = "MIT" [dependencies] websock-proto = { workspace = true } diff --git a/websock-wasm/src/lib.rs b/websock-wasm/src/lib.rs index b8af369..84d600e 100644 --- a/websock-wasm/src/lib.rs +++ b/websock-wasm/src/lib.rs @@ -1,7 +1,4 @@ //! WebAssembly transport implementation for browser-based WebSockets. -//! -//! This crate wraps `web_sys::WebSocket` and mirrors the native transport API. -//! Enable the `stream` feature to split a connection into `Sink` and `Stream`. mod builder; mod connection; diff --git a/websock/Cargo.toml b/websock/Cargo.toml index cb2ef99..80e3164 100644 --- a/websock/Cargo.toml +++ b/websock/Cargo.toml @@ -3,6 +3,12 @@ name = "websock" version.workspace = true edition.workspace = true authors.workspace = true +description = "WebSocket library for native and WebAssembly" +repository = "https://github.com/foctal/websock" +readme = "../README.md" +keywords = ["network", "websocket", "native", "wasm"] +categories = ["network-programming", "web-programming"] +license = "MIT" [dependencies] websock-proto = { workspace = true } diff --git a/websock/src/lib.rs b/websock/src/lib.rs index 8111e91..916beda 100644 --- a/websock/src/lib.rs +++ b/websock/src/lib.rs @@ -1,10 +1,7 @@ -//! Cross-platform WebSocket facade for native and WebAssembly targets. -//! -//! This crate re-exports the shared protocol types and the appropriate -//! transport implementation for the current target architecture. +//! WebSocket library for native and WebAssembly targets. //! //! ## Features -//! - Native (Tokio Tungstenite) support on non-wasm targets +//! - Native (tokio-tungstenite) support on non-wasm targets //! - Browser WebSocket support on wasm32 targets pub use websock_proto::*;