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