max / goingson
| 1 | //! Rhai Plugin Runtime for GoingsOn. |
| 2 | //! |
| 3 | //! This crate provides a sandboxed plugin execution environment using the Rhai |
| 4 | //! scripting language. Plugins can extend GoingsOn with: |
| 5 | //! |
| 6 | //! - **Import Adapters**: Transform external data formats (CSV, JSON, etc.) into GoingsOn entities |
| 7 | //! - **Export Adapters**: Export GoingsOn data to external formats |
| 8 | //! - **Custom Commands**: Add new functionality to the app |
| 9 | //! - **Lifecycle Hooks**: React to app events (on_task_created, etc.) |
| 10 | //! |
| 11 | //! # Safety |
| 12 | //! |
| 13 | //! Plugins run in a sandboxed Rhai engine with configurable limits: |
| 14 | //! - Maximum operations (computation time) |
| 15 | //! - Maximum call stack depth (recursion) |
| 16 | //! - Maximum string/array sizes (memory) |
| 17 | //! - Disabled dangerous operations (eval, system access) |
| 18 | //! |
| 19 | //! # Example |
| 20 | //! |
| 21 | //! ```rust,ignore |
| 22 | //! use goingson_plugin_runtime::{PluginLoader, PluginEngine}; |
| 23 | //! |
| 24 | //! let loader = PluginLoader::new("~/.config/goingson/plugins")?; |
| 25 | //! let plugins = loader.discover_plugins()?; |
| 26 | //! |
| 27 | //! for plugin in plugins { |
| 28 | //! println!("Found plugin: {} v{}", plugin.name, plugin.version); |
| 29 | //! } |
| 30 | //! ``` |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | pub use PluginApi; |
| 40 | pub use ; |
| 41 | pub use ; |
| 42 | pub use PluginLoader; |
| 43 | pub use PluginManifest; |
| 44 | pub use PluginRegistry; |
| 45 | |
| 46 | // Re-export core types for convenience |
| 47 | pub use |
| 48 | ImportEntityType, ImportExecuteResult, ImportItem, ImportItemData, ImportOptions, |
| 49 | ImportParseResult, PluginCapabilities, PluginMeta, PluginType, |
| 50 | ; |
| 51 |