crisol-core 1.3.0

Crisol core: an egui-free data model, themes, metrics, localization, commands, state, and storage.
Documentation
//! The egui-free core of Crisol.
//!
//! This crate owns the parts of the workbench that must work without a window: the
//! typed data model and its connectors, color tokens, theme palettes, size metrics,
//! localization, versioned atomic storage, commands, application state, the host spec,
//! the wire protocol, extension manifests, and agent permissions.
//!
//! It never depends on `egui`, `eframe`, `epaint`, `emath`, or `ecolor`. Colors are
//! [`Rgba`], sizes are plain `f32` points, and time enters through a
//! [`Clock`].
//!
//! The UI crate re-exports every module through `crisol::core`; applications should use
//! that facade and never name this crate directly.
//!
//! ```
//! use crisol_core::color::Rgba;
//! use crisol_core::theme::{Theme, ThemeId};
//!
//! let theme = Theme::for_id(ThemeId::GithubLight);
//! assert_eq!(theme.background, Rgba::from_rgb(0xff, 0xff, 0xff));
//! ```
//!
//! # Features
//!
//! The default set is light: `serde`, `data`, and `storage`. Connectors (`csv`,
//! `workbook`, `arrow`, `parquet`, `sqlite`, `ring`, `channel`) are opt-in. `sqlite` is
//! native-only; every other feature builds on `wasm32-unknown-unknown`.

#![forbid(unsafe_code)]
#![deny(missing_docs)]
// The crate denies unchecked indexing in production; tests index fixed fixtures.
#![cfg_attr(test, allow(clippy::indexing_slicing))]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(feature = "agent")]
#[cfg_attr(docsrs, doc(cfg(feature = "agent")))]
pub mod agent;
pub mod color;
pub mod commands;
#[cfg(feature = "data")]
#[cfg_attr(docsrs, doc(cfg(feature = "data")))]
pub mod data;
pub mod error;
#[cfg(feature = "extensions")]
#[cfg_attr(docsrs, doc(cfg(feature = "extensions")))]
pub mod extensions;
#[cfg(feature = "jobs")]
#[cfg_attr(docsrs, doc(cfg(feature = "jobs")))]
pub mod jobs;
pub mod locale;
pub mod metrics;
#[cfg(feature = "protocol")]
#[cfg_attr(docsrs, doc(cfg(feature = "protocol")))]
pub mod protocol;
#[cfg(feature = "spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "spec")))]
pub mod spec;
#[cfg(feature = "storage")]
#[cfg_attr(docsrs, doc(cfg(feature = "storage")))]
#[cfg(feature = "state")]
#[cfg_attr(docsrs, doc(cfg(feature = "state")))]
pub mod state;
#[cfg(feature = "storage")]
#[cfg_attr(docsrs, doc(cfg(feature = "storage")))]
pub mod storage;
pub mod theme;
pub mod time;

pub use color::Rgba;
pub use commands::{Key, KeyChord, KeySequence, Modifiers};
pub use error::CoreError;
#[cfg(target_arch = "wasm32")]
pub use time::PerformanceClock;
#[cfg(all(feature = "threads", not(target_arch = "wasm32")))]
pub use time::SystemClock;
pub use time::{Clock, ManualClock};