Skip to main content

thunderstore_engine/
lib.rs

1//!
2#![cfg_attr(feature = "io", doc = include_str!("../README.md"))]
3#![cfg_attr(
4  not(feature = "io"),
5  doc = "Game-agnostic Thunderstore engine, built without the `io` feature: the data models, dependency resolver, game definitions, plan types, pure planners, and pure queries. See the crate README for the full feature list."
6)]
7#![cfg_attr(docsrs, feature(doc_cfg))]
8#![forbid(unsafe_code)]
9
10#[cfg(all(
11  feature = "io",
12  not(any(feature = "rustls-tls", feature = "native-tls"))
13))]
14compile_error!(
15  "thunderstore-engine requires exactly one TLS backend: enable rustls-tls (default) or native-tls"
16);
17
18#[cfg(all(feature = "rustls-tls", feature = "native-tls"))]
19compile_error!(
20  "thunderstore-engine: enable only one TLS backend, rustls-tls OR native-tls, not both"
21);
22
23/// Async Thunderstore API client and package-index cache.
24#[cfg(feature = "io")]
25pub mod client;
26/// Ecosystem-schema: games, mod loaders, and install rules.
27pub mod ecosystem;
28/// Error types and the engine `Result` alias.
29pub mod error;
30/// CRC-verified zip extraction primitives.
31pub mod extract;
32/// Schema-driven, root-relative mod install routing.
33pub mod install;
34/// String interning utilities for memory-efficient string storage.
35pub(crate) mod intern;
36/// Per-mod `manifest.json` parsing.
37pub mod manifest;
38/// Package data model and the cache wire format.
39pub mod models;
40/// r2modman-compatible profile management.
41pub mod profile;
42/// UI-agnostic progress reporting.
43pub mod progress;
44/// Pure queries over the package index and a profile's installed packages.
45pub mod query;
46/// Dependency-graph resolution.
47pub mod resolve;
48/// Bounded retry policy for transient network failures.
49mod retry;
50/// Whether the running Steam client can resolve a path.
51pub mod steam;
52/// Mock Thunderstore server, package index, and archives for tests.
53#[cfg(feature = "test-support")]
54pub mod test_support;
55/// Small internal utilities shared across the engine.
56pub(crate) mod util;
57
58pub use error::{Error, Result};
59pub use progress::{NoopProgress, ProgressHandle, ProgressReporter};
60pub use retry::RetryPolicy;