2025-09-04 12:30:25 +00:00
|
|
|
[package]
|
|
|
|
|
name = "socktop_connector"
|
2025-11-17 19:52:22 +00:00
|
|
|
version = "1.50.0"
|
2025-09-04 12:30:25 +00:00
|
|
|
edition = "2024"
|
|
|
|
|
license = "MIT"
|
|
|
|
|
description = "WebSocket connector library for socktop agent communication"
|
|
|
|
|
authors = ["Jason Witty <jasonpwitty+socktop@proton.me>"]
|
|
|
|
|
repository = "https://github.com/jasonwitty/socktop"
|
|
|
|
|
readme = "README.md"
|
|
|
|
|
keywords = ["monitoring", "websocket", "metrics", "system"]
|
2025-09-04 12:41:59 +00:00
|
|
|
categories = ["network-programming", "development-tools"]
|
2025-09-04 12:30:25 +00:00
|
|
|
documentation = "https://docs.rs/socktop_connector"
|
|
|
|
|
|
2025-09-09 09:30:16 +00:00
|
|
|
[lib]
|
|
|
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
|
|
2025-09-04 12:30:25 +00:00
|
|
|
# docs.rs specific metadata
|
|
|
|
|
[package.metadata.docs.rs]
|
|
|
|
|
all-features = true
|
|
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
2025-09-09 09:30:16 +00:00
|
|
|
# WebSocket client - only for non-WASM targets
|
|
|
|
|
tokio-tungstenite = { workspace = true, optional = true }
|
|
|
|
|
tokio = { workspace = true, optional = true }
|
|
|
|
|
futures-util = { workspace = true, optional = true }
|
|
|
|
|
url = { workspace = true, optional = true }
|
|
|
|
|
|
|
|
|
|
# WASM WebSocket support
|
|
|
|
|
wasm-bindgen = { version = "0.2", optional = true }
|
|
|
|
|
wasm-bindgen-futures = { version = "0.4", optional = true }
|
|
|
|
|
js-sys = { version = "0.3", optional = true }
|
|
|
|
|
web-sys = { version = "0.3", features = ["WebSocket", "MessageEvent", "ErrorEvent", "CloseEvent", "BinaryType", "Window", "console"], optional = true }
|
2025-09-04 12:30:25 +00:00
|
|
|
|
|
|
|
|
# TLS support
|
|
|
|
|
rustls = { version = "0.23", features = ["ring"], optional = true }
|
|
|
|
|
rustls-pemfile = { version = "2.1", optional = true }
|
|
|
|
|
|
2025-09-09 09:30:16 +00:00
|
|
|
# Serialization - always available
|
2025-09-04 12:30:25 +00:00
|
|
|
serde = { workspace = true }
|
|
|
|
|
serde_json = { workspace = true }
|
|
|
|
|
|
2025-09-10 17:39:21 +00:00
|
|
|
# Compression - used in both networking and WASM modes
|
|
|
|
|
flate2 = "1.0"
|
2025-09-04 12:30:25 +00:00
|
|
|
|
2025-09-09 09:30:16 +00:00
|
|
|
# Protobuf - always available
|
2025-09-04 12:30:25 +00:00
|
|
|
prost = { workspace = true }
|
|
|
|
|
|
2025-09-09 09:30:16 +00:00
|
|
|
# Error handling - always available
|
2025-09-08 01:55:23 +00:00
|
|
|
thiserror = "2.0"
|
2025-09-04 12:30:25 +00:00
|
|
|
|
|
|
|
|
[build-dependencies]
|
2025-09-04 12:48:02 +00:00
|
|
|
prost-build = "0.13"
|
|
|
|
|
protoc-bin-vendored = "3.0"
|
2025-09-04 12:30:25 +00:00
|
|
|
|
|
|
|
|
[features]
|
2025-09-09 09:30:16 +00:00
|
|
|
default = ["networking", "tls"]
|
2025-09-10 17:39:21 +00:00
|
|
|
networking = ["tokio-tungstenite", "tokio", "futures-util", "url"]
|
2025-09-09 09:30:16 +00:00
|
|
|
tls = ["networking", "rustls", "rustls-pemfile"]
|
2025-09-10 17:39:21 +00:00
|
|
|
wasm = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "web-sys"] # WASM-compatible networking with compression
|