diff --git a/README.md b/README.md index 212bdb0..2ec6b5d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ Working through the [Fly.io distributed systems challenge](https://fly.io/dist-sys/), in Rust. -The `nebkor-maelstrom` crate is meant to be roughly equivalent to the Go Maelstrom.Node package, and -provides serde-backed data structures for messages as well as runner for processing messages from -the Maelstrom network. See `gg-echo/src/main.rs` for the simplest possible use of it. +These solutions are built around the [nebkor-maelstrom](https://crates.io/crates/nebkor-maelstrom) +crate, a dedicated Maelstrom client framework that uses no async and strives for simplicity of +design and use. The most complicated client in this project is the `gg-kafka` client, at 158 lines; +the entire workspace will build from clean in about five seconds. diff --git a/gg-txn/src/main.rs b/gg-txn/src/main.rs index 86e4594..9e61af6 100644 --- a/gg-txn/src/main.rs +++ b/gg-txn/src/main.rs @@ -9,6 +9,13 @@ trait TxnSer { fn serialize(&self) -> Value; } +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +struct TxnOp { + op: String, + key: u64, + value: Option, +} + impl TxnSer for Txn { fn serialize(&self) -> Value { let out: Vec = self @@ -28,13 +35,6 @@ fn main() { runner.run(None); } -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -struct TxnOp { - op: String, - key: u64, - value: Option, -} - #[derive(Debug, Clone, Default)] struct TANode { store: HashMap,