Skip to main content

grr_cli/core/
mod.rs

1//! grr-core — the engine behind the `grr` CLI.
2//!
3//! Service-agnostic: OAuth (keyring-backed), zero-config HTTP transport
4//! with HTTP/3 and rate-limit-aware retry, config, and runtime probes.
5//! The CLI's command surface is generated from the embedded Discovery
6//! index (`crate::discovery`), not from typed per-service clients.
7//!
8//! - HTTP/3 with QUIC (via reqwest unstable), always compiled
9//! - Auto-tuned transport: zero config, adaptive pooling and backoff
10//! - OS-keyring token storage with file fallback
11
12#![deny(unsafe_code)]
13#![deny(clippy::unwrap_used)]
14#![deny(clippy::expect_used)]
15#![deny(clippy::panic)]
16
17pub mod auth;
18pub mod config;
19pub mod config_loader;
20pub mod error;
21pub mod http;
22pub mod runtime;
23
24pub use auth::{AuthConfigBuilder, DeviceAuthChallenge, GoogleAuth, TokenStorage};
25pub use config::{GrrConfig, OAuthConfig};
26pub use config_loader::ConfigLoader;
27pub use error::{GrrError, Result};
28pub use http::{
29    HttpCore, TransportInfo, TransportMode, apply_transport_version, resolve_transport_mode,
30};
31pub use runtime::{RuntimeFeatures, detect_runtime_features};
32
33/// Prelude for convenient imports
34pub mod prelude {
35    pub use crate::core::auth::{AuthConfigBuilder, DeviceAuthChallenge, GoogleAuth, TokenStorage};
36    pub use crate::core::config::{GrrConfig, OAuthConfig};
37    pub use crate::core::config_loader::ConfigLoader;
38    pub use crate::core::error::{GrrError, Result};
39    pub use crate::core::http::{
40        HttpCore, TransportInfo, TransportMode, apply_transport_version, resolve_transport_mode,
41    };
42    pub use crate::core::runtime::{RuntimeFeatures, detect_runtime_features};
43}