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 init_script;
25#[cfg(feature = "runtime")]
26pub mod state;
27#[cfg(feature = "runtime")]
28pub mod workspace;
29
30// Core modules - always available (pure Rust, no platform dependencies)
31// Submodules within primitives that need ratatui/syntect are internally gated
32pub mod model;
33pub mod primitives;
34
35// Runtime-only modules (heavy dependencies, platform-specific)
36#[cfg(feature = "runtime")]
37pub mod app;
38#[cfg(feature = "runtime")]
39pub mod input;
40#[cfg(feature = "runtime")]
41pub mod services;
42
43// Session persistence (client-server architecture)
44#[cfg(feature = "runtime")]
45pub mod client;
46#[cfg(feature = "runtime")]
47pub mod server;
48
49// View module - available for runtime, WASM, and dev-bins (schema generation)
50// Most submodules are runtime-only, but theme types are always available
51#[cfg(any(feature = "runtime", feature = "wasm", feature = "dev-bins"))]
52pub mod view;
53
54// GUI mode - native window with wgpu rendering
55#[cfg(feature = "gui")]
56pub mod gui;
57
58// WASM-specific modules
59#[cfg(feature = "wasm")]
60pub mod wasm;
61
62// Test-only observation API. Compiled with the `runtime` feature so the
63// terminal binary's library form exposes it for integration tests, but
64// never reachable from production call sites — see test_api.rs and
65// docs/internal/e2e-test-migration-design.md.
66#[cfg(feature = "runtime")]
67pub mod test_api;