Skip to main content

Crate mirage_analyzer

Crate mirage_analyzer 

Source
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-v3 feature)

The backend is automatically detected from the database file format.

§Public API

  • Backend - Enum wrapping storage backends with auto-detection
  • StorageTrait - Backend-agnostic storage interface
  • MirageDb - 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;

Modules§

analysis
Inter-procedural analysis using Magellan’s call graph
cfg
cli
integrations
Integration modules for external systems
mir
MIR extraction module
output
router
storage