grimoire_css_lib/core/config/mod.rs
1//! Configuration management for GrimoireCSS.
2//!
3//! Provides two configuration types:
4//! - [`ConfigFs`] - File system based configuration with JSON serialization
5//! - [`ConfigInMemory`] - In-memory configuration for testing and programmatic use
6//!
7//! Use [`ConfigFs`] for standard projects and [`ConfigInMemory`] for testing or embedding.
8
9pub mod config_fs;
10pub mod config_in_memory;
11
12pub use config_fs::*;
13pub use config_in_memory::*;
14
15use std::collections::HashMap;
16
17/// A scroll definition as used by the compiler.
18///
19/// - `spells`: always included when the scroll is invoked.
20/// - `spells_by_args`: optional overloads selected by argument count (keyed by "0", "1", ...).
21#[derive(Debug, Clone, Default)]
22pub struct ScrollDefinition {
23 pub spells: Vec<String>,
24 pub spells_by_args: Option<HashMap<String, Vec<String>>>,
25}