Skip to main content

fresh/
lib.rs

1// Editor library - exposes all core modules for testing
2
3// Initialize i18n with translations from locales/ directory
4rust_i18n::i18n!("locales", fallback = "en");
5
6pub mod i18n;
7
8// Core types and config are always available (needed for schema generation)
9pub mod config;
10pub mod partial_config;
11pub mod types;
12
13// Runtime-only modules (require the "runtime" feature)
14#[cfg(feature = "runtime")]
15pub mod config_io;
16#[cfg(feature = "runtime")]
17pub mod session;
18#[cfg(feature = "runtime")]
19pub mod state;
20
21// Core modules - always available (pure Rust, no platform dependencies)
22// Submodules within primitives that need ratatui/syntect are internally gated
23pub mod model;
24pub mod primitives;
25
26// Runtime-only modules (heavy dependencies, platform-specific)
27#[cfg(feature = "runtime")]
28pub mod app;
29#[cfg(feature = "runtime")]
30pub mod input;
31#[cfg(feature = "runtime")]
32pub mod services;
33
34// View module - available for runtime, WASM, and dev-bins (schema generation)
35// Most submodules are runtime-only, but theme types are always available
36#[cfg(any(feature = "runtime", feature = "wasm", feature = "dev-bins"))]
37pub mod view;
38
39// WASM-specific modules
40#[cfg(feature = "wasm")]
41pub mod wasm;