Target

:= [Target({ name : Str, run : List(U8) -> U8, show : List(U8) -> Str })]

Advanced, type-erased bridge between a typed Roc property and the native runner.

Applications normally construct this value with Fuzz.target or Fuzz.target_with and expose it as target. The methods here define the small byte-oriented ABI consumed by the embedded runner.

new : { name : Str, run : List(U8) -> U8, show : List(U8) -> Str } -> Target

Construct a target from low-level runner callbacks.

run returns zero for a kept input and a non-zero status for a rejected input. Failures should use crash or expect rather than status codes.

name : Target -> Str

Return the human-readable target name reported by the executable.

run : Target, List(U8) -> U8

Decode and test one raw input, returning the runner status code.

show : Target, List(U8) -> Str

Decode one raw input into a human-readable typed value.