Skip to main content

Crate steamroom

Crate steamroom 

Source
Expand description

Steam client protocol library for depot downloading, manifest parsing, and CDN access.

This crate provides the low-level building blocks for interacting with Steam:

  • client – Connect, encrypt, authenticate, and send/receive Steam protocol messages
  • depot – Manifest parsing, chunk decryption/decompression, and checksum verification
  • cdn – Download content from Steam’s CDN with server pooling and rate-limit handling
  • auth – Credential and QR code authentication flows
  • types – KeyValue format parsing (binary and text) with serde deserialization

§Quick start

use steamroom::client::SteamClient;
use steamroom::connection::CmServer;
use steamroom::transport::websocket::WebSocketTransport;
use steamroom::depot::{AppId, DepotId};

// Discover CM servers and connect
let servers = CmServer::fetch().await?;
let ws_server = servers.iter()
    .find(|s| s.protocol == steamroom::connection::Protocol::WebSocket)
    .expect("no WebSocket server");
let transport = WebSocketTransport::connect(ws_server).await?;
let (client, _rx) = SteamClient::connect_ws(transport).await?;
let client = client.prepare().await?;

// For authenticated downloads, build a logon message and call client.login().
// For anonymous access (free apps like Spacewar), use an anonymous logon.

// After login, request product info, depot keys, and manifests:
// let tokens = client.get_access_tokens(&[AppId(480)]).await?;
// let key = client.get_depot_decryption_key(DepotId(481), AppId(480)).await?;

For a higher-level download API with retry, delta patching, and progress events, see the steamroom-client crate.

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

apps
PICS app info, access tokens, and product metadata.
auth
Credential and QR code authentication flows.
cdn
CDN client, server pool, and lancache support.
client
Steam CM client with typestate connection lifecycle.
connection
CM server discovery, encryption, and packet framing.
content
CDN auth token types.
crypto
AES-256, RSA, and other cryptographic primitives.
depot
Depot manifests, chunk decryption/decompression, and ID types.
enums
Steam protocol enums (EResult, file flags, etc.).
error
Error types for all operations.
generated
Auto-generated protobuf message types from Steam’s .proto definitions.
messages
Raw Steam protocol message IDs and header parsing.
transport
Transport implementations (TCP, WebSocket) and capture/replay for testing.
types
KeyValue format parsing, SteamID, GameID, and serde integration.
util
Checksum and compression utilities.