oxide_core/lib.rs
1#![doc = include_str!("../README.md")]
2
3// Crate entrypoint and stable public surface.
4//
5// Why: Oxide needs a small, usage-agnostic Rust core that can be consumed from
6// multiple environments (native, WASM, and Flutter Rust Bridge) without leaking
7// internal module structure into public imports.
8//
9// How: Keep internal modules organized by responsibility and re-export the
10// user-facing types from this file so refactors remain non-breaking.
11mod engine;
12
13/// FFI-oriented utilities.
14pub mod ffi;
15
16/// Async runtime utilities backed by Flutter Rust Bridge.
17pub mod runtime;
18
19#[cfg(feature = "state-persistence")]
20/// Optional state persistence utilities.
21pub mod persistence;
22
23pub use engine::InitContext;
24pub use engine::{
25 CoreResult, OxideError, Reducer, ReducerEngine, SlicedState, StateChange, StateSnapshot,
26};
27pub use ffi::watch_receiver_to_stream;
28pub use tokio;
29
30#[cfg(feature = "state-persistence")]
31pub use serde;
32
33#[cfg(test)]
34mod tests;