DriveThruRPG SDK (Rust)
A Rust SDK for the DriveThruRPG API.
Provides configuration, authentication/session lifecycle, and an async library client for listing orders, product lists, and preparing downloads.
MSRV: 1.95.0 (see rust-toolchain.toml).
Installation
Building from source
This repository uses the dtrpg-api repository as a submodule (API/). build.rs reads
API/openapi.yaml at compile time and generates Rust OpenAPI metadata into Cargo's
OUT_DIR, exposed through dtrpg_sdk::openapi. Clone with submodules, or initialize them
after cloning:
# or, if already cloned:
Quick Start
use ;
let mut sdk = with_config;
// After receiving an auth response from the API:
let response = new;
let session = sdk.apply_auth_response.unwrap;
assert_eq!;
// Create an authenticated library client:
let client = sdk.library_client.unwrap;
// client.list_order_products(Default::default()).await ...
See the crate's rustdoc for the full API reference, including
Config, AuthSession/AuthState, LibraryClient, and the library model types
(OrderProductItem, ProductListItem, etc.).
Development
Release Process
See RELEASE.md.
License
MIT — see LICENSE.md.