rudy_db/
lib.rs

1//! # Rudy DB
2//!
3//! A user-friendly library for interacting with debugging information of Rust compiled artifacts using DWARF.
4//!
5//! This library provides lazy evaluation and incremental recomputation via salsa for use in
6//! long-running processes like debuggers.
7//!
8//! ## Basic Usage
9//!
10//! ```no_run
11//! use rudy_db::{DebugDb, DebugInfo};
12//! use anyhow::Result;
13//!
14//! fn main() -> Result<()> {
15//!     // Create a new database
16//!     let mut db = DebugDb::new();
17//!     
18//!     // Create a DebugInfo instance for your binary
19//!     let debug_info = DebugInfo::new(&db, "path/to/binary")?;
20//!     
21//!     // Resolve an address to source location
22//!     if let Ok(Some(location)) = debug_info.address_to_location(0x12345) {
23//!         println!("Address 0x12345 is at {}:{}", location.file, location.line);
24//!     }
25//!     
26//!     Ok(())
27//! }
28//! ```
29
30mod data;
31mod database;
32mod debug_info;
33mod function_discovery;
34mod index;
35mod outputs;
36mod query;
37mod synthetic_methods;
38#[cfg(test)]
39pub mod test_utils;
40
41// crate re-exports
42pub use rudy_dwarf;
43pub use rudy_types;
44
45// common type re-exports
46pub use data::DataResolver;
47pub use database::DebugDatabaseImpl as DebugDb;
48pub use debug_info::DebugInfo;
49pub use outputs::{
50    DiscoveredFunction, DiscoveredMethod, FunctionParameter, ResolvedAddress, ResolvedLocation,
51    Type, TypedPointer, Value, Variable, VariableInfo,
52};
53pub use rudy_dwarf::function::SelfType;
54pub use synthetic_methods::{SyntheticMethod, evaluate_synthetic_method, get_synthetic_methods};