Skip to main content

Module engine

Module engine 

Source
Expand description

AST Mutation Engine

Registry-centric mutation execution without file I/O.

§Components

  • ASTMutationEngine: Core execution engine
  • ASTMutationContext: Context passed to mutations
  • ASTRegApply: Trait for registry-based mutation execution
  • MutationEvent: Events emitted during mutation
  • SourceDumper: Type-safe pipeline for source generation (Generator → Dumper)
  • RegistryGenerator: Generate files from ASTRegistry + SymbolRegistry (SymbolPath-based)
  • modified_files: Content-based modified file detection

§Implementations

The impls module contains ASTRegApply implementations for mutations defined in ryo-mutations.

Re-exports§

pub use impls::add_item_v2;
pub use impls::create_mod_v2;
pub use impls::remove_item_v2;

Modules§

impls
ASTRegApply implementations for basic mutations

Structs§

ASTMutationContext
Context passed to ASTRegApply::apply_to_registry
ASTMutationEngine
AST-centric mutation execution engine
ExecutionResult
Result of mutation execution
GeneratedCrate
Result of generation for a single crate.
GeneratedFile
A single generated file.
GeneratedWorkspace
Result of multi-crate workspace generation.
RegistryGenerator
Generator that creates source files from ASTRegistry + SymbolRegistry.
SourceDumper
Type-safe source dumper that enforces generator usage.

Enums§

ModificationType
Type of modification made to a symbol
MutationEvent
Events emitted during mutation execution
ResolveError
Error when resolving a symbol

Traits§

ASTRegApply
Trait for mutations that can be applied to ASTRegistry
SourceGenerator
Trait for source code generators.

Functions§

collect_affected_ids
Extract affected symbol IDs from mutation events.
collect_modified_symbols
Collect modified SymbolIds from mutation events.
multi_file_dumper
Create a standard multi-file dumper.
single_file_dumper
Create a single-file dumper (all code in one file with nested mods).