Skip to main content

Crate mcapi

Crate mcapi 

Source
Expand description

Unified async Rust client for the Minecraft ecosystem.

All HTTP platform clients can share a single Arc-backed HttpClient (and its connection pool, Mirror routing, and ResiliencePolicy) either directly via ::from_http(http) or through the lightweight McApi entry point (McApi::builder()).

Every module returns the unified Error and Result types, uses McUuid for Minecraft UUIDs, and re-exports public dependency crates under reexports.

Enable only the modules you need via Cargo features (mojang, modrinth, modrinth-write, curseforge, curseforge-cdn-fallback, yggdrasil, yggdrasil-authlib, yggdrasil-verify, blessing, loaders, bmclapi, java, stream, tracing) or keep the default full feature set. When any HTTP feature is enabled, select exactly one TLS backend: tls-aws-lc (default), tls-native, tls-native-vendored, or tls-rustls-no-provider.

Re-exports§

pub use error::ApiStatusError;http
pub use error::YggdrasilError;yggdrasil
pub use error::Error;
pub use error::Result;
pub use http::HttpClient;http
pub use http::HttpClientBuilder;http
pub use http::ResiliencePolicy;http
pub use mirror::Mirror;http
pub use mirror::RewriteRule;http
pub use uuid::McUuid;

Modules§

blessingblessing
Blessing Skin / LittleSkin v6 REST API and CustomSkinLoader (CustomSkinAPI) client.
bmclapibmclapi
Dedicated client for BMCLAPI-specific loader and OptiFine index endpoints (https://bmclapidoc.bangbang93.com/).
curseforgecurseforge
CurseForge Core REST API (v1/v2) client and Murmur2 file fingerprinting.
error
Unified error and result types returned across all mcapi modules.
httphttp
Shared HTTP client, resilience/retry policies, and mirror-aware request helpers.
javajava
Java runtime manifest API clients covering Mojang Official Java Runtimes, Adoptium / Eclipse Temurin v3, and Azul Zulu Metadata v1.
loadersloaders
Mod loader metadata API clients (Fabric, Quilt, Forge, NeoForge, and LiteLoader).
mirrorhttp
URL prefix rewrite rules and built-in mirror routing presets (BMCLAPI, MCIM, China).
modrinthmodrinth
Modrinth Labrinth v2 REST API client (public search/version/hash lookups and authenticated reads, plus optional creator/team/user write APIs gated behind modrinth-write).
mojangmojang
Mojang / Microsoft authentication chain, public session/UUID lookups, Minecraft Services profile/skin/cape management, Piston Meta manifests, and Minecraft Launcher Content (news & Java patch notes).
profileprofile
Shared Minecraft profile property and decoded textures payload models used by both Mojang session servers and Yggdrasil / authlib-injector servers.
reexports
Re-exports of upstream dependency crates exposed in mcapi public types and signatures.
uuid
Minecraft UUID wrapper supporting undashed/hyphenated serde and offline-mode v3 UUIDs.
yggdrasilyggdrasil
Yggdrasil authentication, session, profile, and optional authlib-injector / RSA verification.

Structs§

McApihttp
Lightweight shared entry point holding a single HttpClient (one reqwest::Client connection pool, Mirror, and ResiliencePolicy) and vending zero-cost platform clients.
McApiBuilderhttp
Builder for McApi.