Restructure: move src to core/ crate, move cmd/supervisor.rs to core/src/bin/supervisor.rs, create workspace
This commit is contained in:
810
Cargo.lock
generated
810
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
71
Cargo.toml
71
Cargo.toml
@@ -1,69 +1,8 @@
|
||||
[package]
|
||||
name = "hero-supervisor"
|
||||
[workspace]
|
||||
members = ["core", "client", "ui"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
# Job types
|
||||
# hero-job = { path = "../job/rust" }
|
||||
hero-job = { git = "https://git.ourworld.tf/herocode/job.git" }
|
||||
# hero-job-client = { path = "../job/rust/client" }
|
||||
hero-job-client = { git = "https://git.ourworld.tf/herocode/job.git" }
|
||||
# Async runtime
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
|
||||
# Async trait support
|
||||
async-trait = "0.1"
|
||||
|
||||
# Redis client
|
||||
redis = { version = "0.25", features = ["aio", "tokio-comp"] }
|
||||
|
||||
# Job module dependencies (now integrated)
|
||||
uuid = { version = "1.0", features = ["v4"] }
|
||||
|
||||
# Logging
|
||||
log = "0.4"
|
||||
thiserror = "1.0"
|
||||
chrono = "0.4"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
env_logger = "0.10"
|
||||
|
||||
# CLI argument parsing
|
||||
clap = { version = "4.0", features = ["derive"] }
|
||||
toml = "0.8"
|
||||
|
||||
# OpenRPC dependencies (now always included)
|
||||
jsonrpsee = { version = "0.24", features = ["server", "macros"] }
|
||||
anyhow = "1.0"
|
||||
|
||||
# CORS support for OpenRPC server
|
||||
tower-http = { version = "0.5", features = ["cors"] }
|
||||
tower = "0.4"
|
||||
hyper = { version = "1.0", features = ["full"] }
|
||||
hyper-util = { version = "0.1", features = ["tokio"] }
|
||||
|
||||
# Mycelium integration (optional)
|
||||
base64 = { version = "0.22", optional = true }
|
||||
rand = { version = "0.8", optional = true }
|
||||
reqwest = { version = "0.12", features = ["json"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio-test = "0.4"
|
||||
hero-supervisor-openrpc-client = { path = "client" }
|
||||
escargot = "0.5"
|
||||
|
||||
[features]
|
||||
default = ["cli"]
|
||||
cli = []
|
||||
mycelium = ["base64", "rand", "reqwest"]
|
||||
|
||||
[[bin]]
|
||||
name = "supervisor"
|
||||
path = "cmd/supervisor.rs"
|
||||
|
||||
# Examples
|
||||
[[example]]
|
||||
name = "osiris_openrpc"
|
||||
path = "examples/osiris_openrpc/main.rs"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "hero-supervisor-openrpc-client"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
description = "OpenRPC client for Hero Supervisor"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
@@ -25,7 +25,7 @@ hero-job = { git = "https://git.ourworld.tf/herocode/job.git" }
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
jsonrpsee = { version = "0.24", features = ["http-client", "macros"] }
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
hero-supervisor = { git = "https://git.ourworld.tf/herocode/supervisor.git" }
|
||||
hero-supervisor = { path = "../core" }
|
||||
hero-job-client = { git = "https://git.ourworld.tf/herocode/job.git" }
|
||||
env_logger = "0.11"
|
||||
|
||||
|
||||
71
core/Cargo.toml
Normal file
71
core/Cargo.toml
Normal file
@@ -0,0 +1,71 @@
|
||||
[package]
|
||||
name = "hero-supervisor"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "hero_supervisor"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "supervisor"
|
||||
path = "src/bin/supervisor.rs"
|
||||
|
||||
[dependencies]
|
||||
# Job types
|
||||
hero-job = { git = "https://git.ourworld.tf/herocode/job.git" }
|
||||
hero-job-client = { git = "https://git.ourworld.tf/herocode/job.git" }
|
||||
|
||||
# Async runtime
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
|
||||
# Async trait support
|
||||
async-trait = "0.1"
|
||||
|
||||
# Redis client
|
||||
redis = { version = "0.25", features = ["aio", "tokio-comp"] }
|
||||
|
||||
# Job module dependencies (now integrated)
|
||||
uuid = { version = "1.0", features = ["v4"] }
|
||||
|
||||
# Logging
|
||||
log = "0.4"
|
||||
thiserror = "1.0"
|
||||
chrono = "0.4"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
env_logger = "0.10"
|
||||
|
||||
# CLI argument parsing
|
||||
clap = { version = "4.0", features = ["derive"] }
|
||||
toml = "0.8"
|
||||
|
||||
# OpenRPC dependencies (now always included)
|
||||
jsonrpsee = { version = "0.24", features = ["server", "macros"] }
|
||||
anyhow = "1.0"
|
||||
|
||||
# CORS support for OpenRPC server
|
||||
tower-http = { version = "0.5", features = ["cors"] }
|
||||
tower = "0.4"
|
||||
hyper = { version = "1.0", features = ["full"] }
|
||||
hyper-util = { version = "0.1", features = ["tokio"] }
|
||||
|
||||
# Mycelium integration (optional)
|
||||
base64 = { version = "0.22", optional = true }
|
||||
rand = { version = "0.8", optional = true }
|
||||
reqwest = { version = "0.12", features = ["json"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio-test = "0.4"
|
||||
hero-supervisor-openrpc-client = { path = "../client" }
|
||||
escargot = "0.5"
|
||||
|
||||
[features]
|
||||
default = ["cli"]
|
||||
cli = []
|
||||
mycelium = ["base64", "rand", "reqwest"]
|
||||
|
||||
# Examples
|
||||
[[example]]
|
||||
name = "osiris_openrpc"
|
||||
path = "examples/osiris_openrpc/main.rs"
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "supervisor-admin-ui"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
@@ -32,4 +32,4 @@ wasm-logger = "0.2"
|
||||
uuid = { version = "1.0", features = ["v4", "js"] }
|
||||
|
||||
# Use our new WASM OpenRPC client
|
||||
hero-supervisor-openrpc-client = { path = "../openrpc" }
|
||||
hero-supervisor-openrpc-client = { path = "../client" }
|
||||
|
||||
Reference in New Issue
Block a user