feat: Add Rhai scripting support
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run

- Add new `sal-rhai` crate for Rhai scripting integration
- Integrate Rhai with existing SAL modules
- Improve error handling for Rhai scripts and SAL functions
- Add comprehensive unit and integration tests for `sal-rhai`
This commit is contained in:
Mahmoud-Emad
2025-06-23 16:23:51 +03:00
parent 6dead402a2
commit 8012a66250
19 changed files with 2109 additions and 38 deletions

34
rhai/Cargo.toml Normal file
View File

@@ -0,0 +1,34 @@
[package]
name = "sal-rhai"
version = "0.1.0"
edition = "2021"
authors = ["PlanetFirst <info@incubaid.com>"]
description = "SAL Rhai - Rhai scripting integration for the System Abstraction Layer"
repository = "https://git.threefold.info/herocode/sal"
license = "Apache-2.0"
[dependencies]
# Core Rhai engine
rhai = { version = "1.12.0", features = ["sync"] }
# Error handling
thiserror = "2.0.12"
# UUID for temporary file generation
uuid = { version = "1.16.0", features = ["v4"] }
# All SAL packages that this aggregation package depends on
sal-os = { path = "../os" }
sal-process = { path = "../process" }
sal-git = { path = "../git" }
sal-vault = { path = "../vault" }
sal-redisclient = { path = "../redisclient" }
sal-postgresclient = { path = "../postgresclient" }
sal-virt = { path = "../virt" }
sal-mycelium = { path = "../mycelium" }
sal-text = { path = "../text" }
sal-net = { path = "../net" }
sal-zinit-client = { path = "../zinit_client" }
[dev-dependencies]
tempfile = "3.5"