Skip to main content

Crate muharrir

Crate muharrir 

Source
Expand description

Muharrir — shared editor primitives for AGNOS creative applications.

Provides reusable building blocks for editor UIs: undo/redo history, expression evaluation, hardware detection, hierarchy trees, and property inspection. Used by salai (game editor), rasa (image editor), tazama (video editor), and shruti (audio DAW).

§Feature Flags

FeatureDefaultDependenciesDescription
historyyeslibro, serde_jsonUndo/redo with tamper-evident audit chain
expryesabacoMath expression evaluation for property fields
hwyesai-hwaccelHardware detection and quality tiers
hierarchyyesGeneric parent-child tree building
inspectoryesProperty sheet for editor panels
commandyesGeneric command pattern with undo/redo stacks
notificationyesToast notifications and persistent log
selectionyesGeneric selection tracking and panel visibility
dirtyyesModified/dirty state tracking with save-point
recentyesRecent files list with cap and persistence
prefsyesserde_jsonPreferences storage with JSON I/O
fullnoall aboveEverything enabled

Re-exports§

pub use error::Error;
pub use error::Result;
pub use hierarchy::FlatEntry;
pub use hierarchy::HierarchyNode;
pub use hierarchy::NodeId;
pub use hierarchy::build_hierarchy;
pub use hierarchy::flatten;
pub use history::Action;
pub use history::History;
pub use hw::HardwareProfile;
pub use hw::QualityTier;
pub use inspector::Property;
pub use inspector::PropertySheet;
pub use expr::ExprError;
pub use expr::eval_f64;
pub use expr::eval_or;
pub use expr::eval_or_parse;
pub use command::Command;
pub use command::CommandHistory;
pub use command::CompoundCommand;
pub use notification::Notification;
pub use notification::NotificationLog;
pub use notification::Severity;
pub use notification::Toast;
pub use notification::Toasts;
pub use selection::PanelStates;
pub use selection::Selection;
pub use dirty::DirtyState;
pub use recent::RecentFiles;
pub use prefs::PrefsError;
pub use prefs::PrefsStore;
pub use prefs::config_dir;

Modules§

command
Generic command pattern for reversible editor operations.
dirty
Modified/dirty state tracking for editor documents.
error
Error types for muharrir.
expr
Expression evaluator for property fields.
hierarchy
Generic hierarchy tree — parent-child relationships with depth-first traversal.
history
Undo/redo history backed by libro::AuditChain.
hw
Hardware capability detection for adaptive editor configuration.
inspector
Generic property inspector — gather and display component/property info.
notification
Toast notifications and persistent notification log.
prefs
Preferences storage with JSON persistence and XDG path resolution.
recent
Recent files/projects list with cap and persistence.
selection
Generic selection tracking and panel visibility state.