Commit Graph

3 Commits

Author SHA1 Message Date
Timur Gordon
87c556df7a wip 2025-10-29 16:52:33 +01:00
Timur Gordon
03e5615541 Move package registration functions to respective rhai modules
- Moved register_note_functions to objects/note/rhai.rs
- Moved register_event_functions to objects/event/rhai.rs
- Updated engine.rs to import these functions from their modules
- Better code organization with functions co-located with their types
2025-10-28 12:34:11 +01:00
Timur Gordon
e760a184b1 Refactor to use Rhai packages for efficient engine creation
- Created OsirisPackage with all OSIRIS types and functions registered in the package
- Functions now registered directly in package module (Note, Event, get_context)
- Created ZdfzPackage extending OsirisPackage
- Engine factory pattern: creates Engine::new_raw() + registers package (very cheap)
- Removed TypeRegistry (unused code)
- Simplified runner to use factory functions instead of passing packages
- Package is created once, then factory efficiently creates engines on demand
2025-10-28 12:20:17 +01:00