pinch_points/lib.rs
1//! Pinch Points: a real-time grid routing puzzler.
2//!
3//! [`sim`] is the headless simulation core and [`app`] the Bevy shell around
4//! it. The simulation is deliberately free of any engine types: plain Rust,
5//! integer-only, and deterministic, so it can be unit-tested, replayed, and
6//! driven over the wire. See `docs/pinch-points-spec.md`.
7//!
8//! There is almost no `unsafe` here and there is not going to be more: the
9//! game is a grid of integers, and the one thing it does with bytes a
10//! stranger wrote is decode them.
11//!
12//! The one exception is `app::keymap::os`, where asking Windows and macOS
13//! what the keys say means calling their keyboard APIs: a dozen lines of
14//! FFI with a reason written over each of them. That module allows itself
15//! what this line denies, which is why it is `deny` rather than `forbid`;
16//! an `#[allow(unsafe_code)]` anywhere else is a change to argue with.
17#![deny(unsafe_code)]
18// A public item pointing at a private one is the useful direction in this
19// crate: these docs are read by whoever is working on the game, in an
20// editor where the link resolves, and almost everything worth pointing at
21// is internal. Demoting a dozen correct cross-references to plain text
22// would cost the reader something to satisfy a rendering this crate does
23// not publish.
24//
25// A link that resolves to *nothing* is the rot this lint gets confused
26// with, and it is a different thing: `app::keymap` pointed at a module
27// that had moved and said so in a warning nobody was reading, because
28// `cargo doc` is not part of the build and its output was thirteen lines
29// long. That one is denied now, so the next stale link fails `cargo doc`
30// instead of hiding in the noise of the ones that are fine.
31#![allow(rustdoc::private_intra_doc_links)]
32#![deny(rustdoc::broken_intra_doc_links)]
33
34pub mod app;
35pub mod bots;
36pub mod gif;
37pub mod highlight;
38pub mod lzw;
39pub mod share;
40pub mod sim;
41pub mod transport;