Skip to main content

Module rust_adapter

Module rust_adapter 

Source
Expand description

Rust-native adapter — executes component operations without spawning shell subprocesses.

This module provides:

  • RustAdapter — a generic adapter that wraps a Rust-native function
  • RustAdapterFn — type alias for Rust-native executor functions

§Design

Each RustAdapter wraps a function pointer or closure that performs the actual component operation in Rust. The adapter produces output that matches the format of the legacy shell scripts for behavior parity.

§Validation Assertions

  • VAL-MIGR-009: Rust-registered adapter routes to Rust impl, no shell subprocess
  • VAL-MIGR-012: Output format matches shell for migrated components
  • VAL-MIGR-013: Exit codes match shell for success/failure/partial cases

Structs§

RustAdapter
Adapter that routes component operations to native Rust implementations.
ShellOutputFormat
Shell-compatible output formatter.

Type Aliases§

RustAdapterFn
A Rust-native executor function.