modify: rust 插件
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
[package]
|
||||
name = "chongming-worker-rs"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "chongming 进程插件 Rust SDK(语言无关线协议的 Rust 实现,见 docs/plugin-wire-protocol.md)"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
zenoh = "1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
toml = "0.8"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.3"
|
||||
async-stream = "0.3"
|
||||
futures-util = "0.3"
|
||||
sha1 = "0.10"
|
||||
# 数据库封装(SQLite / PostgreSQL 异步连接池,对齐 Python chongming_database)。
|
||||
# 注:默认不启用 TLS 后端;PostgreSQL 走 SSL 时需追加 tls-rustls-ring 等 feature。
|
||||
sqlx = { version = "0.8", default-features = false, features = [
|
||||
"runtime-tokio",
|
||||
"sqlite",
|
||||
"postgres",
|
||||
"any",
|
||||
], optional = true }
|
||||
redis = { version = "0.27", default-features = false, features = ["tokio-comp", "connection-manager"], optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
# 启用共享缓存(Redis 后端),用于多实例全局收敛配置与副本数
|
||||
redis-cache = ["redis"]
|
||||
# 启用数据库封装(SQLite/PostgreSQL,sqlx)。开启后脚本打包用:
|
||||
# bash build.sh dist "database"
|
||||
database = ["sqlx"]
|
||||
|
||||
[[bin]]
|
||||
name = "gen_models"
|
||||
path = "src/bin/gen_models.rs"
|
||||
|
||||
[[example]]
|
||||
name = "demo"
|
||||
path = "examples/demo.rs"
|
||||
Reference in New Issue
Block a user