How inversive-labs/eloizer works
Eloizer is a Rust static analyzer for Solana and Anchor contracts, exposed as both a library and a CLI. Its main workflow scans Rust files, parses them into ASTs, runs configurable security rules, and presents findings or writes a report. The graph also preserves the documented rule discovery and configuration commands, AST JSON output, and the rule-authoring DSL. Relationships are included only where the README or supplied source/index evidence supports them; unsampled CLI and analyzer internals limit some detail.
Main entry points: src/main.rs CLI entry · analyze.rs Analyze command · mod.rs Built-in registration · src/main.rs Library CLI
Components 22
User Interfaces
- CLI entry
cli/src/main.rs - Analyze command
cli/src/commands/analyze.rs - List rules
cli/src/commands/list_rules.rs - Rule details
cli/src/commands/rule_info.rs - Config command
cli/src/commands/config.rs - Initialize config
cli/src/commands/init.rs - Library CLI
src/main.rs
Parsing and Analysis
- Rust AST parser
src/ast/parser.rs - AST JSON output
src/ast/json.rs - Analysis coordinator
src/analyzer/mod.rs - Rule engine
src/analyzer/engine.rs - AST query DSL
src/analyzer/dsl/query.rs - Rule builder DSL
src/analyzer/dsl/builders.rs - Source locations
src/analyzer/span_utils.rs
Detection Rules
- Built-in registration
src/analyzer/rules/mod.rs - High severity rules
src/analyzer/rules/solana/high - Medium severity rules
src/analyzer/rules/solana/medium - Low severity rules
src/analyzer/rules/solana/low
Findings and Reports
- Report generator
src/analyzer/reporting.rs - Analysis findings
Other components
- Contract developer
- Rust contracts
Connections 33
- Contract developer → CLI entry: runs commands
README.md - Contract developer → Library CLI: runs analysis
README.md - CLI entry → Analyze command: dispatches
cli/src/main.rs - CLI entry → List rules: dispatches
cli/src/main.rs - CLI entry → Rule details: dispatches
cli/src/main.rs - CLI entry → Config command: dispatches
cli/src/main.rs - CLI entry → Initialize config: dispatches
cli/src/main.rs - Analyze command → Rust contracts: scans
README.md - Analyze command → Rust AST parser: parses files
cli/src/commands/analyze.rs - Analyze command → Analysis coordinator: starts analysis
README.md - Library CLI → Rust AST parser: parses directory
src/main.rs - Library CLI → Analysis coordinator: starts analysis
src/main.rs - Library CLI → AST JSON output: writes AST JSON
src/main.rs - Rust AST parser → Rust contracts: reads source
src/ast/parser.rs - Analysis coordinator → Rule engine: executes rules
src/analyzer/mod.rs - Rule engine → Built-in registration: loads built-ins
src/analyzer/engine.rs - Built-in registration → High severity rules: registers
src/analyzer/rules/mod.rs - Built-in registration → Medium severity rules: registers
src/analyzer/rules/mod.rs - Built-in registration → Low severity rules: registers
src/analyzer/rules/mod.rs - High severity rules → AST query DSL: queries AST
src/analyzer/rules/solana/high/missing_signer_check/mod.rs - Medium severity rules → AST query DSL: queries AST
src/analyzer/rules/solana/medium/duplicate_mutable_accounts/mod.rs - Low severity rules → AST query DSL: queries AST
src/analyzer/rules/solana/low/anchor_instructions/mod.rs - Rule builder DSL → AST query DSL: builds queries
src/analyzer/dsl/builders.rs - Rule engine → Source locations: creates extractor
src/analyzer/engine.rs - AST query DSL → Source locations: extracts locations
src/analyzer/dsl/query.rs - Rule engine → Analysis findings: collects findings
src/analyzer/engine.rs - Analysis coordinator → Report generator: provides findings
README.md - Report generator → Analysis findings: formats
README.md - Analyze command → Report generator: saves report
README.md - Library CLI → Report generator: generates report
src/main.rs - Analyze command → Analysis findings: displays summary
cli/src/commands/analyze.rs - List rules → Built-in registration: lists available rules
README.md - Rule details → Built-in registration: shows rule details
README.md