Expand description
Adapter module — maps component IDs to executors (Rust or legacy shell script).
This module provides:
AdapterRegistry— maps component IDs to executors (Rust or legacy shell script)- [
RustAdapter] — routes to native Rust implementations (no shell subprocess) - [
LegacyAdapter] — invokes shell scripts with correct argument forwarding AdapterError— structured errors for unknown components and execution failures
§Design
The adapter layer is the migration bridge between Rust-native implementations and legacy shell scripts. For each component ID, the registry determines whether to use a Rust executor (fast, no subprocess) or fall back to the legacy shell script (backward compatible).
component_id → AdapterRegistry → RustAdapter (native)
→ LegacyAdapter (shell script)
→ Err(AdapterNotFound)§Validation Assertions
- VAL-MIGR-009: Rust-registered adapter routes to Rust impl, no shell subprocess
- VAL-MIGR-010: No Rust adapter → falls back to install_*.sh with correct args
- VAL-MIGR-011: Unknown component ID returns Err(AdapterNotFound)
- VAL-MIGR-012: Output format matches shell for migrated components
- VAL-MIGR-013: Exit codes match shell for success/failure/partial cases
Modules§
- legacy_
adapter - Legacy adapter — invokes shell scripts with correct argument forwarding.
- rust_
adapter - Rust-native adapter — executes component operations without spawning shell subprocesses.
Structs§
- Adapter
Output - Result of executing a component adapter.
- Adapter
Ref - Reference to an adapter returned by the registry.
- Adapter
Registry - Registry that maps component IDs to their executor adapters.
- Registry
Executor - An
ApplyExecutorthat delegates to theAdapterRegistry.
Enums§
- Adapter
Error - Errors produced by the adapter layer.
Traits§
- Adapter
- Trait for component adapters.