Expand description
Mirage - Path-Aware Code Intelligence Engine
A control-flow and logic graph engine for multi-language codebases.
§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 (works with both SQLite and native-v3)
let blocks = backend.get_cfg_blocks(123)?;§Backend Support
Mirage supports two storage backends:
- SQLite: Default backend, backward compatible with Magellan v7+
- Native-V3: High-performance KV backend (requires
backend-native-v3feature)
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)
Re-exports§
pub use storage::MirageDb;pub use storage::create_schema;pub use storage::DatabaseStatus;pub use storage::Backend;pub use storage::StorageTrait;pub use storage::CfgBlockData;