Expand description
Mirage - Path-Aware Code Intelligence Engine
A control-flow and logic graph engine for multi-language codebases.
For high-level convenience functions, see the forge module.
§Getting Started
use mirage_analyzer::Backend;
use std::path::Path;
// Auto-detect and open the database backend
let backend = Backend::detect_and_open(Path::new("codegraph.db"))?;
// Query CFG blocks
let blocks = backend.get_cfg_blocks(123)?;§Backend Support
Mirage supports SQLite storage with optional geometric analysis:
- SQLite: Default backend, backward compatible with Magellan v7+
The backend is automatically detected from the database file format.
§Public API
Backend- Enum wrapping storage backends with auto-detectionStorageTrait- Backend-agnostic storage interfaceMirageDb- Legacy database connection (wraps Backend internally)forge- High-level API for external consumers
Re-exports§
pub use storage::create_schema;pub use storage::Backend;pub use storage::CfgBlockData;pub use storage::DatabaseStatus;pub use storage::DocumentInfo;pub use storage::FactInfo;pub use storage::MirageDb;pub use storage::StorageTrait;pub use forge::database_status;pub use forge::detect_cycles;pub use forge::find_dead_symbols;pub use forge::get_callees;pub use forge::get_function_cfg;pub use forge::get_function_paths;pub use forge::reachable_symbols;pub use forge::resolve_function;pub use forge::CycleReport;pub use forge::DeadSymbolInfo;pub use forge::FunctionCfgResult;