@@ -26,40 +26,36 @@ application through a set of powerful, composable building blocks.
2626The entire ` Mountain ` backend and any future native components are built by
2727implementing the traits and consuming the effects defined in this crate.
2828
29- ** ` Common ` ** is engineered to:
30-
31- 1 . ** Enforce Architectural Boundaries: ** By defining all application
32- capabilities as abstract ` trait ` s, it ensures a clean separation between the
33- definition of an operation and its execution.
34- 2 . ** Provide a Declarative Effect System: ** Introduces the ` ActionEffect ` type,
35- which describes an asynchronous operation as a value, allowing logic to be
36- composed, tested, and executed in a controlled ` ApplicationRunTime ` .
37- 3 . ** Standardize Data Contracts: ** Defines all Data Transfer Objects (DTOs) and
38- a universal ` CommonError ` enum, ensuring consistent data structures and error
39- handling across the entire native ecosystem.
40- 4 . ** Maximize Testability and Reusability: ** Because this crate is pure and
41- abstract, any component that depends on it can be tested with mock
42- implementations of its traits, leading to fast and reliable unit tests.
29+ ** What Common gives you: **
30+
31+ 1 . ** Test without Tauri. ** Every capability is an abstract trait. Mock the trait,
32+ test your logic. No window, no webview, no sidecar needed.
33+ 2 . ** Bugs at compile time. ** The ` ActionEffect ` type describes operations as
34+ values. The compiler catches missing dependencies and type mismatches before
35+ runtime.
36+ 3 . ** One error enum, everywhere. ** ` CommonError ` covers every failure domain .
37+ No stringly-typed errors, no ` unwrap() ` surprises.
38+ 4 . ** Stable IPC contracts. ** DTOs are ` serde ` -compatible and shared across
39+ Mountain, Cocoon, and Wind. Change the type, and every consumer gets a
40+ compile error.
41+
42+ 📖 ** [ Rust API Documentation ] ( https://Rust.Documentation.Editor.Land/Common/ ) **
4343
4444---
4545
4646## Key Features & Concepts 🔐
4747
48- - ** Declarative ` ActionEffect ` System:** Operations are not executed immediately
49- — they are described as ` ActionEffect ` data structures and then passed to a
50- runtime for execution.
51- - ** Trait-Based Dependency Injection:** A clean, compile-time DI system using
52- the ` Environment ` and ` Requires ` traits, allowing components to declare their
53- dependencies without being tied to a specific implementation.
54- - ** Asynchronous Service Traits:** All core application services (e.g.,
55- ` FileSystemReader ` , ` UserInterfaceProvider ` , ` CommandExecutor ` ) are defined as
56- ` async trait ` s, providing a fully asynchronous-first architecture.
57- - ** Comprehensive DTO Library:** Contains definitions for all data structures
58- used for IPC communication with ` Cocoon ` and internal state management in
59- ` Mountain ` . All types are ` serde ` -compatible.
60- - ** Universal ` CommonError ` Enum:** A single, exhaustive ` enum ` for all possible
61- failures, enabling robust and predictable error handling across the entire
62- application.
48+ - ** Declarative effects, not callbacks.** Operations are data. Describe what
49+ you want, compose effects, then run them. Testing is trivial: just inspect
50+ the effect value without executing it.
51+ - ** Compile-time dependency injection.** The ` Environment ` and ` Requires ` traits
52+ wire dependencies at compile time. No runtime reflection, no service locator.
53+ - ** Async-first.** Every service trait (` FileSystemReader ` , ` CommandExecutor ` ,
54+ etc.) is ` async ` . No blocking calls anywhere in the contract.
55+ - ** Shared DTOs for all IPC.** Mountain, Cocoon, and Wind all use the same
56+ ` serde ` -compatible types. Schema changes break at compile time, not at runtime.
57+ - ** One error type.** ` CommonError ` covers all 20 service domains. Pattern match
58+ once, handle every case.
6359
6460---
6561
@@ -283,6 +279,14 @@ history of changes specific to **Common**.
283279
284280---
285281
282+
283+ ## See Also
284+
285+ - [ Architecture Overview] ( https://editor.land/Doc/architecture )
286+ - [ Mountain] ( https://github.com/CodeEditorLand/Mountain )
287+ - [ Echo] ( https://github.com/CodeEditorLand/Echo )
288+ - [ Air] ( https://github.com/CodeEditorLand/Air )
289+
286290## Funding & Acknowledgements 🙏🏻
287291
288292** Common** is a core element of the ** Land** ecosystem. This project is funded
0 commit comments