Skip to main content

fresh/
lib.rs

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