feat: Migrate SAL to Cargo workspace
- Migrate individual modules to independent crates - Refactor dependencies for improved modularity - Update build system and testing infrastructure - Update documentation to reflect new structure
This commit is contained in:
122
Cargo.toml
122
Cargo.toml
@@ -12,53 +12,66 @@ readme = "README.md"
|
||||
|
||||
[workspace]
|
||||
members = [".", "vault", "git", "redisclient", "mycelium", "text", "os", "net", "zinit_client", "process", "virt", "postgresclient", "rhai", "herodo"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.metadata]
|
||||
# Workspace-level metadata
|
||||
rust-version = "1.70.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
# Core shared dependencies with consistent versions
|
||||
anyhow = "1.0.98"
|
||||
base64 = "0.22.1"
|
||||
dirs = "6.0.0"
|
||||
env_logger = "0.11.8"
|
||||
futures = "0.3.30"
|
||||
glob = "0.3.1"
|
||||
lazy_static = "1.4.0"
|
||||
libc = "0.2"
|
||||
log = "0.4"
|
||||
once_cell = "1.18.0"
|
||||
rand = "0.8.5"
|
||||
regex = "1.8.1"
|
||||
reqwest = { version = "0.12.15", features = ["json"] }
|
||||
rhai = { version = "1.12.0", features = ["sync"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tempfile = "3.5"
|
||||
thiserror = "2.0.12"
|
||||
tokio = { version = "1.45.0", features = ["full"] }
|
||||
url = "2.4"
|
||||
uuid = { version = "1.16.0", features = ["v4"] }
|
||||
|
||||
# Database dependencies
|
||||
postgres = "0.19.10"
|
||||
r2d2_postgres = "0.18.2"
|
||||
redis = "0.31.0"
|
||||
tokio-postgres = "0.7.13"
|
||||
|
||||
# Crypto dependencies
|
||||
chacha20poly1305 = "0.10.1"
|
||||
k256 = { version = "0.13.4", features = ["ecdsa", "ecdh"] }
|
||||
sha2 = "0.10.7"
|
||||
hex = "0.4"
|
||||
|
||||
# Ethereum dependencies
|
||||
ethers = { version = "2.0.7", features = ["legacy"] }
|
||||
|
||||
# Platform-specific dependencies
|
||||
nix = "0.30.1"
|
||||
windows = { version = "0.61.1", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Threading",
|
||||
"Win32_Storage_FileSystem",
|
||||
] }
|
||||
|
||||
# Specialized dependencies
|
||||
zinit-client = "0.3.0"
|
||||
urlencoding = "2.1.3"
|
||||
tokio-test = "0.4.4"
|
||||
|
||||
[dependencies]
|
||||
hex = "0.4"
|
||||
anyhow = "1.0.98"
|
||||
base64 = "0.22.1" # Base64 encoding/decoding
|
||||
cfg-if = "1.0"
|
||||
chacha20poly1305 = "0.10.1" # ChaCha20Poly1305 AEAD cipher
|
||||
clap = "2.34.0" # Command-line argument parsing
|
||||
dirs = "6.0.0" # Directory paths
|
||||
env_logger = "0.11.8" # Logger implementation
|
||||
ethers = { version = "2.0.7", features = ["legacy"] } # Ethereum library
|
||||
glob = "0.3.1" # For file pattern matching
|
||||
jsonrpsee = "0.25.1"
|
||||
k256 = { version = "0.13.4", features = [
|
||||
"ecdsa",
|
||||
"ecdh",
|
||||
] } # Elliptic curve cryptography
|
||||
lazy_static = "1.4.0" # For lazy initialization of static variables
|
||||
libc = "0.2"
|
||||
log = "0.4" # Logging facade
|
||||
once_cell = "1.18.0" # Lazy static initialization
|
||||
postgres = "0.19.4" # PostgreSQL client
|
||||
postgres-types = "0.2.5" # PostgreSQL type conversions
|
||||
r2d2 = "0.8.10"
|
||||
r2d2_postgres = "0.18.2"
|
||||
rand = "0.8.5" # Random number generation
|
||||
redis = "0.31.0" # Redis client
|
||||
regex = "1.8.1" # For regex pattern matching
|
||||
rhai = { version = "1.12.0", features = ["sync"] } # Embedded scripting language
|
||||
serde = { version = "1.0", features = [
|
||||
"derive",
|
||||
] } # For serialization/deserialization
|
||||
serde_json = "1.0" # For JSON handling
|
||||
sha2 = "0.10.7" # SHA-2 hash functions
|
||||
tempfile = "3.5" # For temporary file operations
|
||||
tera = "1.19.0" # Template engine for text rendering
|
||||
thiserror = "2.0.12" # For error handling
|
||||
tokio = { version = "1.45.0", features = ["full"] }
|
||||
tokio-postgres = "0.7.8" # Async PostgreSQL client
|
||||
tokio-test = "0.4.4"
|
||||
uuid = { version = "1.16.0", features = ["v4"] }
|
||||
reqwest = { version = "0.12.15", features = ["json"] }
|
||||
urlencoding = "2.1.3"
|
||||
russh = "0.42.0"
|
||||
russh-keys = "0.42.0"
|
||||
async-trait = "0.1.81"
|
||||
futures = "0.3.30"
|
||||
thiserror = "2.0.12" # For error handling in the main Error enum
|
||||
sal-git = { path = "git" }
|
||||
sal-redisclient = { path = "redisclient" }
|
||||
sal-mycelium = { path = "mycelium" }
|
||||
@@ -71,22 +84,3 @@ sal-virt = { path = "virt" }
|
||||
sal-postgresclient = { path = "postgresclient" }
|
||||
sal-vault = { path = "vault" }
|
||||
sal-rhai = { path = "rhai" }
|
||||
|
||||
# Optional features for specific OS functionality
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
nix = "0.30.1" # Unix-specific functionality
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.61.1", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Threading",
|
||||
"Win32_Storage_FileSystem",
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
mockall = "0.13.1" # For mocking in tests
|
||||
tempfile = "3.5" # For tests that need temporary files/directories
|
||||
tokio = { version = "1.28", features = [
|
||||
"full",
|
||||
"test-util",
|
||||
] } # For async testing
|
||||
|
Reference in New Issue
Block a user