# turnbase-protocol - Complete API Documentation > Transport-agnostic request/response wire types for the Turnbase engine **Version:** 0.0.0 **Authors:** Matan Lurey **License:** MIT OR Apache-2.0 **Repository:** https://github.com/crates-lurey-io/turnbase **Keywords:** game-engine, turn-based, deterministic, gamedev, ai Generated: 2026-07-25 17:07:54 UTC Created by: [cargo-llms-txt](https://github.com/masinc/cargo-llms-txt) ## Table of Contents ### src/lib.rs - pub const PROTOCOL_VERSION - pub enum Request - pub enum Response --- ## README.md ### turnbase-protocol Transport-agnostic request/response wire types for the Turnbase engine Part of the [turnbase](https://github.com/crates-lurey-io/turnbase) workspace. --- ## src/lib.rs ### PROTOCOL_VERSION ```rust pub const PROTOCOL_VERSION: u32 ``` Wire-format version, bumped on any breaking change to a type in this crate. Stamped into save files and (eventually) exchanged with a remote host so a mismatch fails fast on an explicit check instead of surfacing as a confusing deserialization error deeper in the stack. ### Request ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum Request { Query, Act(A), } ``` A message from a client to whichever process holds the authoritative state. `A` is a game's `Action` type. The action is carried by value so a host can move it straight into `Game::apply` without cloning. ### Response ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum Response { State { version: u64, view: V }, Ack, Error(String), } ``` A message back to the client. `V` is a game's `View` type.