• Joined on 2025-07-12

game-core (0.1.0)

Published 2026-06-06 17:45:00 -05:00 by numbers

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+https://gitea.softwaresmyth.com/api/packages/numbers/cargo/" # Sparse index
# index = "https://gitea.softwaresmyth.com/numbers/_cargo-index.git" # Git

[net]
git-fetch-with-cli = true
cargo add game-core@0.1.0

About this package

Tak platform WebSocket wire protocol and shared game contracts

game-core

Shared contracts for the Tak platform: the Game trait, erased server adapter, and the WebSocket wire protocol.

Mobile and desktop clients depend on this crate for protocol types (Envelope, ClientMessage, ServerMessage, ErrorCode, lobby/challenge/chat structs). Game-specific payloads (mv, state, current_player, outcome) are opaque serde_json::Value at the protocol layer; decode them with tak-engine.

The authoritative wire specification is ADR 0004.

Example envelope

{
  "v": 1,
  "type": "move",
  "id": "01932a1b-2c3d-7890-abcd-ef1234567890",
  "payload": {
    "game_id": "01932a1b-2c3d-7890-abcd-ef1234567891",
    "mv": { "type": "place", "kind": "flat", "at": "a1" }
  }
}

The mv field is opaque to the protocol; its JSON shape is defined by tak-engine::TakMove.

Dependencies

ID Version
chrono ^0.4
serde ^1.0.228
serde_json ^1.0.145
thiserror ^2.0.18
uuid ^1
Details
Cargo
2026-06-06 17:45:00 -05:00
23
UNLICENSED
22 KiB
Assets (1)
Versions (1) View all
0.1.0 2026-06-06