flatland_protocol/lib.rs
1//! Flatland3 client ↔ server wire types.
2//!
3//! v1 uses a versioned envelope and serde-compatible payloads. The default
4//! on-wire codec is **postcard** (see [`Codec`] and benchmark in `codec_bench`).
5
6pub mod codec;
7pub mod frame;
8pub mod progression;
9pub mod types;
10
11pub use codec::{Codec, CodecError, PostcardCodec};
12pub use frame::{
13 read_client_message, read_server_message, write_client_message, write_server_message,
14 FrameError,
15};
16pub use progression::{
17 primary_internal, LevelProgress, ProgressionCurve, PRIMARY_STAT_ROWS, SKILL_ROWS,
18};
19pub use types::*;
20
21/// Current protocol version negotiated at session start.
22/// Bump when postcard payload layout changes (blueprints v3, vitals regen, …).
23pub const PROTOCOL_VERSION: u16 = 10;