feat: 重构项目结构并添加核心功能
refactor: 将代码按功能模块重新组织到 core/runtime/control 等目录 feat(core): 添加 Context、FlowNode 等核心 trait 和类型 feat(runtime): 实现 FlowEngine 和状态管理 feat(control): 添加顺序/并行/条件控制流节点 feat(nodes): 实现 HTTP/DB/MQ 等业务节点 docs: 更新 README 添加架构说明和快速开始示例 test: 添加性能测试脚本和示例代码
This commit is contained in:
39
dsl-flow/Cargo.toml
Normal file
39
dsl-flow/Cargo.toml
Normal file
@ -0,0 +1,39 @@
|
||||
[package]
|
||||
name = "dsl-flow"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "A Rust DSL-based workflow engine supporting stateful/stateless flows, async nodes, fork-join, and extensible expression engines (Rhai/JS)."
|
||||
readme = "README.md"
|
||||
|
||||
[lib]
|
||||
name = "dsl_flow"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[features]
|
||||
default = ["rhai", "http"]
|
||||
rhai = ["dep:rhai"]
|
||||
js = ["dep:boa_engine"]
|
||||
http = ["dep:reqwest"]
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time"] }
|
||||
futures = "0.3"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1.0" }
|
||||
thiserror = "1.0"
|
||||
async-trait = "0.1"
|
||||
uuid = { version = "1", features = ["v4"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
|
||||
|
||||
# Optional engines and nodes
|
||||
rhai = { version = "1", optional = true, features = ["serde", "sync"] }
|
||||
boa_engine = { version = "0.20", optional = true }
|
||||
reqwest = { version = "0.12", optional = true, features = ["json", "rustls-tls"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time"] }
|
||||
httpmock = "0.7"
|
||||
anyhow = "1.0"
|
||||
|
||||
Reference in New Issue
Block a user