symsrv
This crate lets you download and cache pdb files from symbol servers,
according to the rules from the _NT_SYMBOL_PATH environment variable.
It exposes an async API and uses reqwest and tokio::fs.
The downloaded symbols are stored and never evicted.
Microsoft Documentation
Example
use std::path::PathBuf;
use symsrv::{get_symbol_path_from_environment, SymbolCache};
# fn use_pdb_bytes(b: &[u8]) {}
#
# async fn wrapper() -> Result<(), symsrv::Error> {
let symbol_path =
get_symbol_path_from_environment("srv**https://msdl.microsoft.com/download/symbols");
let symbol_cache = SymbolCache::new(symbol_path, false);
let relative_path: PathBuf =
["dcomp.pdb", "648B8DD0780A4E22FA7FA89B84633C231", "dcomp.pdb"].iter().collect();
let file_contents = symbol_cache.get_pdb(&relative_path).await?;
use_pdb_bytes(&file_contents[..]);
# Ok(())
# }