examples/chat-room-rust/README.md
Example project demonstrating real-time messaging and actor state management in Rust. This is the Rust translation of the chat-room example.
git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/chat-room-rust
cargo build -p rivet-engine
RIVET_ENGINE_BINARY_PATH=../../target/debug/rivet-engine cargo run
See the Rust Quickstart for creating the actor and connecting clients.
State value tracks message statsThe chat room demonstrates core Rivet Actor patterns for real-time communication:
src/lib.rs): Defines the chatRoom actor with SQLite-backed message history, persisted stats, sendMessage / getHistory / getStats actions, and a newMessage eventRead more about actions, state, and events.
MIT