rust-elm 0.1.0
Elm Architecture for Rust, evolving toward The Composable Architecture (UDF).
Install
[]
= { = "../rust-elm" }
= "3.2.0"
= "3.1.0"
= { = "1.38", = ["rt-multi-thread", "macros"] }
Quick start
use ;
// Or with composable reducers:
// let program = ReducerProgram::new(reducers![update_a, update_b], init, subscriptions);
// let runtime = Runtime::from_reducer_program(program, Environment::new(), 64);
//
// Full shop demo: cargo run -p rust-elm --example ecommerce
// Architecture: book/architecture.md
Modules
| Module | Purpose |
|---|---|
cmd |
Commands returned from update |
effect |
Pure async effect descriptions (debounce, throttle, from_run, cancel) |
sub |
Subscription descriptions |
runtime |
Bus-driven update loop + interpreter |
store |
Store, StoreTask, ScopedStore, state subscription |
test_store |
ExhaustiveTestStore for synchronous effect/action testing |
shared |
Shared<T>, Storage, InMemoryStorage, FileStorage (serde) |
dependencies |
Re-exports rust_dependencies — see book/dependencies.md |
env |
Environment (live/test), FakeClock, MockHttp |
optics |
State/action focusing via rust-key-paths |
test_runtime |
Sync testing without Tokio |
reducer |
Reducer trait, CombineReducers, reducers! |
identified |
Re-exports rust_identified_vec — see book/identified.md |
scope |
ScopeReducer, IfLetReducer, ForEachReducer, lift_cmd |
replay |
Action log + replay harness; snapshot/restore for state checkpoints |
Key paths prelude
use ;
use Kp;
See ROADMAP.md, book/architecture.md, and workspace todo.md.