/// Quick test of OSIRIS Rhai integration /// /// Run with: /// ```bash /// cargo run --example test_osiris /// ``` use runner_rust::engine::osiris::create_osiris_engine; fn main() -> Result<(), Box> { println!("๐Ÿงช Testing OSIRIS Rhai Engine\n"); // Test 1: Create engine println!("Test 1: Creating OSIRIS engine..."); let engine = create_osiris_engine("redis://localhost:6379", 1)?; println!("โœ“ Engine created successfully\n"); // Test 2: Run simple script println!("Test 2: Running simple script..."); let script = r#" print("Hello from OSIRIS Rhai!"); // Create a note let note = note("test_notes") .title("Test Note") .content("This is a test") .tag("test", "true"); print("Note created: " + note.get_title()); "#; match engine.eval::<()>(script) { Ok(_) => println!("โœ“ Script executed successfully\n"), Err(e) => { println!("โœ— Script error: {}\n", e); println!("Note: This is expected if HeroDB is not running"); } } println!("โœ… Tests completed!"); println!("\nTo run full integration:"); println!("1. Start HeroDB: cd ../herodb && cargo run --release"); println!("2. Run: cargo run --example test_osiris"); Ok(()) }