How xodus-gaming/xodus works
1. Repository shape
- This is a Rust workspace with two crates:
- xodus: the core library that implements Xbox PC game auth, licensing, package handling, and XVD/MSIXVC crypto/parsing.
- xodus-cli: a command-line front end that drives the library for user-facing flows like login, license retrieval, download, and extraction.
2. Overall purpose
- Xodus targets the end-to-end pipeline needed to run Xbox PC games on Linux: authenticate a user/device, obtain licenses, fetch game packages, and process MSIXVC/XVD content.
- The README shows the project is already centered on login, package download, license acquisition, parsing, and decryption, with remaining work around on-demand EXE decryption and MSIXVC2 support.
3. CLI boundary
- xodus-cli is the operational entry point.
- Its command modules (login, license, download, extract) are thin orchestration layers over the library.
- Supporting code like webview.rs, device.rs, and user.rs suggests the CLI also handles interactive auth/device setup and local state presentation, not just raw API calls.
4. Authentication subsystem
- The library has a dedicated auth layer in xodus/src/auth.rs, supported by models/live.rs, SOAP models, and api/live.
- This indicates Microsoft/Xbox authentication is not a single request but a staged exchange involving user auth, token brokerage, and token exchange.
- The docs tree reinforces this with separate documentation for login, Xbox Live, Xbox services, and Game Pass.
5. Device identity and registration
- Device-related logic is split out into hardware.rs, models/devicecredential.rs, and secrets.rs.
- This subsystem appears responsible for device registration, device credential generation/storage, and derived device keys mentioned in the README.
- In the architecture diagram, this should sit alongside auth because the device identity is part of the credential chain used later for licensing and downloads.
6. Licensing subsystem
- Licensing is a distinct core area: licensing.rs, licensing/content.rs, licensing/splicense.rs, plus helper utilities and models.
- The README’s “license parsing” and “licensing flow” map directly to this layer.
- This subsystem likely consumes tokens and device credentials, then produces entitlement/license artifacts needed to authorize game package access.
7. External service APIs
- api/live and api/xbox provide the outbound integrations.
- api/displaycatalog.rs indicates catalog lookups for game/product metadata, while the live/xbox modules likely wrap Microsoft/Xbox service endpoints.
- The architecture is therefore centered on external service calls rather than a local server or database.
8. Protocol and serialization layer
- models/soap contains SOAP envelope/security/token structures, which means part of the auth flow uses SOAP-based Microsoft endpoints.
- The models tree also includes structured representations for licensing, display catalog, CLEP, secrets, and XVD data.
- This layer is the contract boundary between network payloads and the rest of the business logic.
9. Content/package handling
- xodus/src/xvd and models/xvd implement the MSIXVC/XVD domain: constants, flags, raw/parsed structures, math, crypto, and utilities.
- This is the package-processing pipeline used after download: parse the package, understand its structure, and decrypt content where supported.
- The README’s “MSIXVC parsing support” and “Decryption” map here.
10. CLEP / challenge handling
- clep.rs and clep/challenge.rs show a specialized challenge/response subsystem.
- This likely supports cryptographic validation or key derivation steps in the broader licensing/content flow.
- For an architecture diagram, it belongs between licensing/auth and content decryption, since it appears to participate in protected-content access.
11. Data flow through the system
- A typical flow is:
1. CLI triggers login.
2. Auth modules obtain user and device tokens.
3. Device registration and key derivation complete.
4. Licensing modules fetch/parse licenses.
5. API modules query catalog/download data.
6. XVD/MSIXVC modules parse and decrypt package content.
- The CLI is the coordinator; the library contains the stateful domain logic.
12. Documentation and project scaffolding
- docs/ is organized by domain (xbox, xodus) and mirrors the code boundaries, which is useful for mapping subsystems to diagram boxes.
- GitHub Actions (.github/workflows/rust.yml) indicates standard Rust CI, but there is no sign of a backend service or persistent datastore; the product is primarily a local client and library interacting with remote Microsoft/Xbox services.
Main entry points: licensing.rs Licensing · models.rs Models · auth.rs Auth · mod.rs XVD
Components 33
CLI
Operational entry point and user-facing orchestration
- xodus-cli · Starts the command-line app and dispatches subcommands
xodus-cli/src/main.rs - Commands · Coordinates login, license, download, and extract flows
xodus-cli/src/commands.rs - Login · Interactive sign-in and token acquisition flow
xodus-cli/src/commands/login.rs - License · Fetches and presents licensing state
xodus-cli/src/commands/license.rs - Download · Drives package download and preparation
xodus-cli/src/commands/download.rs - Extract · Triggers content extraction from downloaded packages
xodus-cli/src/commands/extract.rs - Webview · Interactive browser-based auth helper
xodus-cli/src/webview.rs - Device · CLI-side device identity and registration helpers
xodus-cli/src/device.rs - License State · CLI-side license formatting and display helpers
xodus-cli/src/license.rs
Core Library
Authentication, licensing, APIs, and package processing
- xodus · Shared domain library used by the CLI
xodus/src/lib.rs - Auth · Microsoft/Xbox authentication and token brokerage
xodus/src/auth.rs - Hardware · Builds and manages device identity material
xodus/src/hardware.rs - Secrets · Derives or stores device-linked secrets and keys
xodus/src/secrets.rs - Licensing · Obtains and parses licenses and entitlements
xodus/src/licensing.rs - CLEP · Challenge-response support for protected content access
xodus/src/clep.rs - APIs · Outbound service integrations for Microsoft/Xbox endpoints
xodus/src/api.rs - XVD · MSIXVC/XVD parsing, crypto, and content utilities
xodus/src/xvd/mod.rs - Live API · Microsoft/Xbox live authentication and service calls
xodus/src/api/live/mod.rs - Xbox API · Xbox service endpoints used by the library
xodus/src/api/xbox/mod.rs - Catalog API · Queries display catalog and product metadata
xodus/src/api/displaycatalog.rs - Content Lic · Content-oriented license processing helpers
xodus/src/licensing/content.rs - SP License · Specialized license parsing and interpretation
xodus/src/licensing/splicense.rs - Challenge · CLEP challenge handling and validation
xodus/src/clep/challenge.rs - Crypto · XVD/MSIXVC cryptographic operations
xodus/src/xvd/crypt.rs - Math · Numeric and structural helpers for XVD processing
xodus/src/xvd/math.rs
Models
Typed contracts and serialized payload structures
- Models · Typed data models shared across auth, licensing, and package handling
xodus/src/models.rs - SOAP · SOAP envelope, security, crypto, and token structures
xodus/src/models/soap/mod.rs - Live Models · Live/Xbox identity and token payloads
xodus/src/models/live.rs - License Models · License and entitlement payload structures
xodus/src/models/licensing.rs - Device Models · Device credential and registration payloads
xodus/src/models/devicecredential.rs - Catalog Models · Display catalog and package metadata structures
xodus/src/models/displaycatalog.rs - XVD Models · Raw and parsed MSIXVC/XVD structures and flags
xodus/src/models/xvd/mod.rs - CLEP Models · Challenge and response payload structures for protected content flows
xodus/src/models/clep.rs
Connections 48
- xodus-cli → Commands: dispatches · Entrypoint hands control to subcommand routing
- Commands → Login: login · Routes to authentication flow
- Commands → License: license · Routes to license inspection flow
- Commands → Download: download · Routes to download flow
- Commands → Extract: extract · Routes to extraction flow
- Login → Webview: auth ui · Uses browser/webview assistance for interactive sign-in
- Login → Auth: auth · Delegates login exchange to the library
- Login → Device: device setup · Coordinates local device state for login
- License → Licensing: licenses · Requests license acquisition and parsing
- License → License State: format · Presents license results to the user
- Download → APIs: download data · Uses service clients to obtain package and metadata data
- Download → Licensing: authorize · Ensures entitlement before package access
- Extract → XVD: extract · Invokes package parsing and content processing
- xodus → Auth: exports · Library root exposes authentication subsystem
- xodus → Licensing: exports · Library root exposes licensing subsystem
- xodus → APIs: exports · Library root exposes API clients
- xodus → XVD: exports · Library root exposes package handling
- Auth → Live API: uses · Authentication flows call live service endpoints
- Auth → SOAP: serializes · Auth exchanges rely on SOAP payloads
- Auth → Live Models: tokens · Auth state is represented with live identity models
- Auth → Hardware: binds · Authentication is tied to device identity
- Hardware → Device Models: models · Device registration data structures
- Hardware → Secrets: derives · Hardware identity feeds secret/key derivation
- Licensing → Live API: requests · Licensing uses live service calls
- Licensing → Xbox API: requests · Licensing may consult Xbox services
- Licensing → Content Lic: processes · License content is normalized and interpreted
- Licensing → SP License: parses · Specialized license artifacts are parsed
- Licensing → License Models: models · Licensing uses entitlement data contracts
- Licensing → CLEP: challenges · Protected-content flows may require CLEP challenge handling
- APIs → Catalog API: catalog · Catalog lookups are a major API surface
- APIs → Live API: live · Wraps Microsoft/Xbox live endpoints
- APIs → Xbox API: xbox · Wraps Xbox-specific service endpoints
- Live API → SOAP: payloads · Live API exchanges use SOAP structures
- Live API → Live Models: identity · Live API works with identity/token models
- Catalog API → Catalog Models: metadata · Catalog queries return product metadata models
- CLEP → Challenge: challenge · Core CLEP entrypoint delegates to challenge logic
- CLEP → CLEP Models: contracts · CLEP uses challenge-related data models
- XVD → Crypto: decrypts · XVD layer handles content decryption
- XVD → Math: computes · XVD layer uses structural/math helpers
- XVD → XVD Models: structures · Package parsing is driven by XVD models
- XVD → CLEP: protected content · Content access can depend on CLEP support
- Models → SOAP: contains · Models tree includes SOAP contracts
- Models → Live Models: contains · Models tree includes live identity contracts
- Models → License Models: contains · Models tree includes licensing contracts
- Models → Device Models: contains · Models tree includes device credential contracts
- Models → Catalog Models: contains · Models tree includes catalog contracts
- Models → XVD Models: contains · Models tree includes XVD/MSIXVC structures
- Models → CLEP Models: contains · Models tree includes CLEP challenge contracts