Skip to main content

Crate mirage

Crate mirage 

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
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-detection
  • StorageTrait - Backend-agnostic storage interface
  • MirageDb - Legacy database connection (wraps Backend internally)

Re-exports§

pub use storage::create_schema;
pub use storage::Backend;
pub use storage::CfgBlockData;
pub use storage::DatabaseStatus;
pub use storage::MirageDb;
pub use storage::StorageTrait;

Modules§

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