| Crates.io | redfish |
| lib.rs | redfish |
| version | 0.3.1 |
| created_at | 2026-01-09 16:46:09.455725+00 |
| updated_at | 2026-01-09 17:36:18.540772+00 |
| description | Production-grade Rust SDK for DMTF Redfish (async-first, optional blocking). |
| homepage | https://github.com/lvillis/redfish-rs |
| repository | https://github.com/lvillis/redfish-rs |
| max_upload_size | |
| id | 2032372 |
| size | 291,823 |
Production-grade Rust SDK for DMTF Redfish (async-first, optional blocking).
Goals:
reqwest types in public signatures)Retry-After)[dependencies]
redfish = "0.3.0"
By default, the crate is async and uses rustls.
async (default): async client (Tokio-based)blocking: enable BlockingClient (synchronous API)rustls (default): TLS via rustlsnative-tls: TLS via system-native TLStracing: emit tracing spans for requestsdangerous: allow opting into invalid-certs/hostnames (see docs; not recommended)Enable at most one of
rustlsornative-tls.
use redfish::{Auth, Client};
#[tokio::main]
async fn main() -> Result<(), redfish::Error> {
let client = Client::builder("https://bmc.example.com")?
.auth(Auth::basic("admin", "password"))
.build()?;
let root = client.service_root().get().await?;
println!("RedfishVersion = {}", root.redfish_version);
let systems = client.systems().list().await?;
println!("Systems members = {}", systems.members.len());
Ok(())
}
Enable the blocking feature:
redfish = { version = "0.3.0", default-features = false, features = ["blocking", "rustls"] }
use redfish::{Auth, BlockingClient};
fn main() -> Result<(), redfish::Error> {
let client = BlockingClient::builder("https://bmc.example.com")?
.auth(Auth::basic("admin", "password"))
.build()?;
let root = client.service_root().get()?;
println!("RedfishVersion = {}", root.redfish_version);
Ok(())
}
Many Redfish implementations support session-based auth at:
POST /redfish/v1/SessionService/SessionsThe response typically includes:
X-Auth-Token (session token)Location (session resource URI; delete it to logout)This crate supports that flow via client.sessions().create(...).
Redfish is a large standard. This crate provides:
For everything else (OEM extensions, less-common resources), you can always fall back to
client.get_uri::<serde_json::Value>(...) or the more general client.request_json_value(...)
and gradually add typed models as needed.
In addition to collection services (e.g. client.systems().list()), this crate provides
member-oriented helpers for common sub-resources:
client.system("1").get_bios().await?client.system("1").patch_bios_settings(...).await?client.manager("1").get_network_protocol().await?client.chassis_member("1").get_power().await?These helpers intentionally model only the most stable/common fields, while still preserving
vendor/OEM fields via extra maps.
rust-toolchain.toml)Licensed under either of:
at your option.