Merge branch 'main' of git.ourworld.tf:herocode/actor_osis
This commit is contained in:
@@ -1,42 +1,4 @@
|
||||
//! # Rhailib Domain-Specific Language (DSL) Engine
|
||||
//!
|
||||
//! This module provides a comprehensive Domain-Specific Language implementation for the Rhai
|
||||
//! scripting engine, exposing business domain models and operations through a fluent,
|
||||
//! chainable API.
|
||||
//!
|
||||
//! ## Overview
|
||||
//!
|
||||
//! The DSL is organized into business domain modules, each providing Rhai-compatible
|
||||
//! functions for creating, manipulating, and persisting domain entities. All operations
|
||||
//! include proper authorization checks and type safety.
|
||||
//!
|
||||
//! ## Available Domains
|
||||
//!
|
||||
//! - **Business Operations** (`biz`): Companies, products, sales, shareholders
|
||||
//! - **Financial Models** (`finance`): Accounts, assets, marketplace operations
|
||||
//! - **Content Management** (`library`): Collections, images, PDFs, books, slideshows
|
||||
//! - **Workflow Management** (`flow`): Flows, steps, signature requirements
|
||||
//! - **Community Management** (`circle`): Circles, themes, membership
|
||||
//! - **Contact Management** (`contact`): Contact information and relationships
|
||||
//! - **Access Control** (`access`): Security and permissions
|
||||
//! - **Time Management** (`calendar`): Calendar and scheduling
|
||||
//! - **Core Utilities** (`core`): Comments and fundamental operations
|
||||
//! - **Generic Objects** (`object`): Generic object manipulation
|
||||
//!
|
||||
//! ## Usage Example
|
||||
//!
|
||||
//! ```rust
|
||||
//! use rhai::Engine;
|
||||
//! use crate::engine::register_dsl_modules;
|
||||
//!
|
||||
//! let mut engine = Engine::new();
|
||||
//! register_dsl_modules(&mut engine);
|
||||
//!
|
||||
//! // Now the engine can execute scripts like:
|
||||
//! // let company = new_company().name("Acme Corp").email("contact@acme.com");
|
||||
//! // let saved = save_company(company);
|
||||
//! ```
|
||||
|
||||
use heromodels::models::heroledger::rhai::register_heroledger_rhai_modules;
|
||||
use rhai::Engine;
|
||||
use rhailib_dsl;
|
||||
use std::sync::{Arc, OnceLock};
|
||||
@@ -161,6 +123,8 @@ pub fn register_dsl_modules(engine: &mut Engine) {
|
||||
|
||||
// Register basic object functionality directly
|
||||
register_object_functions(engine);
|
||||
heromodels::heroledger::rhai::register_heroledger_rhai_modules(&mut engine);
|
||||
|
||||
|
||||
println!("Rhailib Domain Specific Language modules registered successfully.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user