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

View File

@@ -27,7 +27,7 @@
//!
//! let unsafe_name = "User's File [Draft].txt";
//! let safe_name = name_fix(unsafe_name);
//! assert_eq!(safe_name, "users_file_draft_.txt");
//! assert_eq!(safe_name, "user_s_file_draft_.txt");
//! ```
//!
//! ## Text Replacement

View File

@@ -21,6 +21,7 @@ pub fn register_text_module(engine: &mut Engine) -> Result<(), Box<EvalAltResult
// Register TextReplacer constructor
engine.register_fn("text_replacer_new", text_replacer_new);
engine.register_fn("text_replacer_builder", text_replacer_new); // Alias for backward compatibility
// Register TextReplacerBuilder instance methods
engine.register_fn("pattern", pattern);