Files
osiris/src/lib.rs
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

29 lines
684 B
Rust

// Allow the crate to reference itself as ::osiris for the derive macro
extern crate self as osiris;
pub mod config;
pub mod error;
pub mod index;
pub mod interfaces;
pub mod objects;
pub mod retrieve;
pub mod store;
// Rhai integration modules (top-level)
pub mod context;
pub mod engine;
pub use error::{Error, Result};
pub use store::{BaseData, IndexKey, Object, Storable};
pub use objects::{Event, Note};
// OsirisContext is the main type for Rhai integration
pub use context::{OsirisContext, OsirisInstance, OsirisContextBuilder};
pub use engine::{
create_osiris_engine,
OsirisPackage,
};
// Re-export the derive macro
pub use osiris_derive::Object as DeriveObject;