Skip to main content

Crate ud_cli

Crate ud_cli 

Source
Expand description

Library half of the ud CLI.

The CLI binary is a thin wrapper over the functions exposed here; the split lets integration tests call the same code path as the binary without spawning a subprocess.

Structs§

DiffContext
16-byte windows of input vs rebuilt bytes around the first divergence, with the divergence offset highlighted.
SourceRoundTripReport
Result of roundtrip_through_source.

Enums§

SourceRoundTripError

Functions§

raw_6502_load_addr
Detect “this is a 6502 raw ROM image” inputs. The convention is that 6502 binaries place vectors (NMI/RESET/IRQ) at the top of the 16-bit address space, $FFFA-$FFFF. For an image of length L, the natural load address is 0x10000 - L so the image extends exactly to $FFFF.
roundtrip
Run the round-trip pipeline on input, write the result to output, and verify byte-equality with the input.
roundtrip_through_source
Run input through the full source pipeline: decompile → text → parse → verify_asm → lower_to_elf → write.