From ea5e7d336719571e51ef14478ab603e71126e3d8 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 22:28:05 +0100 Subject: v0.2.2: split client/server logic into the library --- src/lib.rs | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index e400619..a4fb801 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,25 +1,10 @@ -//! Shared library for zagan-bet: exposes client/server storage layers and the -//! TOFU trust module to integration tests in `tests/`. - +//! Shared library for zagan-bet. +//! +//! The client and server binaries are thin adapters around these modules: +//! terminal/TLS/SQLite wiring stays in `src/bin/`, while game rules, protocol +//! handling, storage, and view logic live here so they can be tested from +//! `tests/` without a network or a terminal. + +pub mod client; +pub mod server; pub mod tofu; - -#[path = "bin/client/database.rs"] -pub mod client_database; - -#[path = "bin/server/database.rs"] -pub mod server_database; - -// Server game logic — re-exported under `crate::games::traits` so that -// `use crate::games::traits::*` inside slots.rs resolves correctly whether -// the file is compiled as part of the lib or the server binary. -#[path = "bin/server/games/traits.rs"] -pub mod server_game_traits; - -pub mod games { - pub mod traits { - pub use crate::server_game_traits::*; - } -} - -#[path = "bin/server/games/slots.rs"] -pub mod server_slots; -- cgit v1.2.3