blivemsg 0.2.1

Bilibili Live Message Library
Documentation
[package]
name = "blivemsg"
version = "0.2.1"
edition = "2024"
description = "Bilibili Live Message Library"
license = "MIT"
repository = "https://github.com/urlynn/blivemsg"
documentation = "https://docs.rs/blivemsg"
keywords = ["bilibili", "danmaku", "live", "streaming"]
categories = ["api-bindings", "network-programming"]
readme = "README_CRATES.md"  # crates.io 使用专门的 README

# ==================== 目标配置 ====================
[lib]
name = "blivemsg"
path = "src/lib.rs"

[[bin]]
name = "blivemsg-cli"
path = "src/bin/cli.rs"
required-features = ["cli"]

# ==================== Features 配置 ====================
[features]
default = []  # 库模式:最小依赖

# CLI 工具
cli = [
    "dep:clap",
    "dep:toml",           
    "protobuf-support", 
]

# Protobuf 支持(可选,用于 INTERACT_WORD_V2 消息)
protobuf-support = ["dep:prost", "dep:bytes", "dep:base64"]

# 浏览器指纹模拟(高级选项)
emulation = ["dep:wreq-util"]

# ==================== 核心依赖(库必需)====================
[dependencies]
tokio = { version = "1.52.3", features = ["rt-multi-thread", "macros", "time", "net"] }
tokio-stream = "0.1.18"
tokio-tungstenite = { version = "0.29.0", features = ["native-tls"] }
wreq = "5.3"
futures-util = "0.3.32"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
brotli = "8.0.2"
flate2 = "1.1.9"
md-5 = "0.11.0"
hex = "0.4.3"
thiserror = "2.0.17"

# ==================== 可选依赖 ====================
# CLI 工具依赖
clap = { version = "4.6.1", features = ["derive"], optional = true }
toml = { version = "0.9.8", optional = true }

# Protobuf 支持
prost = { version = "0.14.3", optional = true }
bytes = { version = "1.11.1", optional = true }
base64 = { version = "0.22.1", optional = true }

# 浏览器指纹模拟
wreq-util = { version = "2.2.6", optional = true }