feat: Add PostgreSQL and Redis client support
Some checks failed
Rhai Tests / Run Rhai Tests (push) Waiting to run
Rhai Tests / Run Rhai Tests (pull_request) Has been cancelled

- Add PostgreSQL client functionality for database interactions.
- Add Redis client functionality for cache and data store operations.
- Extend Rhai scripting with PostgreSQL and Redis client modules.
- Add documentation and test cases for both clients.
This commit is contained in:
Mahmoud Emad
2025-05-09 09:45:50 +03:00
parent d3c645e8e6
commit f002445c9e
29 changed files with 2787 additions and 455 deletions

View File

@@ -11,32 +11,41 @@ categories = ["os", "filesystem", "api-bindings"]
readme = "README.md"
[dependencies]
tera = "1.19.0" # Template engine for text rendering
tera = "1.19.0" # Template engine for text rendering
# Cross-platform functionality
libc = "0.2"
cfg-if = "1.0"
thiserror = "1.0" # For error handling
redis = "0.22.0" # Redis client
thiserror = "1.0" # For error handling
redis = "0.22.0" # Redis client
postgres = "0.19.4" # PostgreSQL client
tokio-postgres = "0.7.8" # Async PostgreSQL client
postgres-types = "0.2.5" # PostgreSQL type conversions
lazy_static = "1.4.0" # For lazy initialization of static variables
regex = "1.8.1" # For regex pattern matching
serde = { version = "1.0", features = ["derive"] } # For serialization/deserialization
regex = "1.8.1" # For regex pattern matching
serde = { version = "1.0", features = [
"derive",
] } # For serialization/deserialization
serde_json = "1.0" # For JSON handling
glob = "0.3.1" # For file pattern matching
tempfile = "3.5" # For temporary file operations
log = "0.4" # Logging facade
glob = "0.3.1" # For file pattern matching
tempfile = "3.5" # For temporary file operations
log = "0.4" # Logging facade
rhai = { version = "1.12.0", features = ["sync"] } # Embedded scripting language
rand = "0.8.5" # Random number generation
clap = "2.33" # Command-line argument parsing
rand = "0.8.5" # Random number generation
clap = "2.33" # Command-line argument parsing
# Optional features for specific OS functionality
[target.'cfg(unix)'.dependencies]
nix = "0.26" # Unix-specific functionality
nix = "0.26" # Unix-specific functionality
[target.'cfg(windows)'.dependencies]
windows = { version = "0.48", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_Storage_FileSystem"] }
windows = { version = "0.48", features = [
"Win32_Foundation",
"Win32_System_Threading",
"Win32_Storage_FileSystem",
] }
[dev-dependencies]
tempfile = "3.5" # For tests that need temporary files/directories
tempfile = "3.5" # For tests that need temporary files/directories
[[bin]]
name = "herodo"