Files
ArenaPublic/crates/arena-core/src/lib.rs
T

57 lines
1.8 KiB
Rust

// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Built on Domi, https://aula.marek-novak.cz
//! The pure core of Arena Domi: strict parsers for game launcher files and the game library model.
//!
//! Nothing here touches the file system, processes, the network, the environment, the registry or the clock.
//! Inputs are bytes or values; outputs are [`Game`]s and a merged [`Library`]. Every parser treats its input as
//! hostile: sizes, depth, lengths and counts are capped ([`limits`]), errors are typed ([`ParseError`]) and no input
//! can make the crate panic.
//!
//! Sources: [`steam`] (`libraryfolders.vdf`, `appmanifest_<id>.acf`), [`epic`] (`.item` JSON), [`gog`] (registry
//! values the app passes in), [`manual`] (an `.exe` the user picked) and [`domi`] (Domi games from the Atrium
//! registry). [`merge`] dedupes the scans into one library.
//!
//! Launch strings are built by [`Launch::uri`] only from validated, parsed fields.
//!
//! For the overlay agent: [`frames`] (frametime statistics: average FPS, 1 % and 0.1 % lows, stutters), [`detect`]
//! (which running exe is a game, and the user's "This is a game" marks) and [`hotkey`] (the overlay shortcut).
#![forbid(unsafe_code)]
#![deny(
clippy::unwrap_used,
clippy::expect_used,
clippy::indexing_slicing,
clippy::string_slice,
clippy::panic,
clippy::todo,
clippy::unimplemented,
clippy::unreachable
)]
mod error;
mod id;
mod launch;
pub mod limits;
mod model;
mod path;
mod text;
pub mod vdf;
pub mod detect;
pub mod frames;
pub mod hotkey;
pub mod domi;
pub mod epic;
pub mod gog;
pub mod manual;
pub mod steam;
pub use domi::DomiLaunch;
pub use error::ParseError;
pub use id::{GameId, Source};
pub use launch::Launch;
pub use model::{CoverHint, Game, Library, merge};
pub use path::WinPath;