diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-28 22:28:05 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-28 22:28:05 +0100 |
| commit | ea5e7d336719571e51ef14478ab603e71126e3d8 (patch) | |
| tree | 4fb59337501f798e6591701e52b9e785307efd63 /src/lib.rs | |
| parent | Fix TUI: render_lines 6 for correct MoveUp, drain buffered events before clea... (diff) | |
| download | zagan-bet-ea5e7d336719571e51ef14478ab603e71126e3d8.tar.gz zagan-bet-ea5e7d336719571e51ef14478ab603e71126e3d8.zip | |
v0.2.2: split client/server logic into the library
Diffstat (limited to '')
| -rw-r--r-- | src/lib.rs | 33 |
1 files changed, 9 insertions, 24 deletions
| @@ -1,25 +1,10 @@ | |||
| 1 | //! Shared library for zagan-bet: exposes client/server storage layers and the | 1 | //! Shared library for zagan-bet. |
| 2 | //! TOFU trust module to integration tests in `tests/`. | 2 | //! |
| 3 | 3 | //! The client and server binaries are thin adapters around these modules: | |
| 4 | //! terminal/TLS/SQLite wiring stays in `src/bin/`, while game rules, protocol | ||
| 5 | //! handling, storage, and view logic live here so they can be tested from | ||
| 6 | //! `tests/` without a network or a terminal. | ||
| 7 | |||
| 8 | pub mod client; | ||
| 9 | pub mod server; | ||
| 4 | pub mod tofu; | 10 | pub mod tofu; |
| 5 | |||
| 6 | #[path = "bin/client/database.rs"] | ||
| 7 | pub mod client_database; | ||
| 8 | |||
| 9 | #[path = "bin/server/database.rs"] | ||
| 10 | pub mod server_database; | ||
| 11 | |||
| 12 | // Server game logic — re-exported under `crate::games::traits` so that | ||
| 13 | // `use crate::games::traits::*` inside slots.rs resolves correctly whether | ||
| 14 | // the file is compiled as part of the lib or the server binary. | ||
| 15 | #[path = "bin/server/games/traits.rs"] | ||
| 16 | pub mod server_game_traits; | ||
| 17 | |||
| 18 | pub mod games { | ||
| 19 | pub mod traits { | ||
| 20 | pub use crate::server_game_traits::*; | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | #[path = "bin/server/games/slots.rs"] | ||
| 25 | pub mod server_slots; | ||
