Types-only contract crate for the droidsaw top-binary CLI surface that sibling
crates (notably droidsaw-bench) build subprocess invocations against.
Bench runs the top binary as a subprocess and parses its stdout. Today the
invocation strings ("droidsaw", "decompile", "--all", …) are prose
constants scattered across runner files. A rename in the top binary becomes a
runtime surprise during a corpus run, not a compile-time error at review.
This crate pins the invocation surface into Rust types. Both the top binary and bench import the same constants and enums. Rename a variant, break both sides at compile time.
Types only. No runtime logic beyond a pure to_args() serializer that turns
a DroidsawInvocation into the Vec<OsString> that Command::args wants.
No parsers, decoders, I/O, or logging.
The workspace allows two types-only carve-outs from the bench-sibling-linkage rule:
droidsaw-common— generic algorithms shared across parse cratesdroidsaw-cli-contract— CLI invocation shape shared between top binary and bench
Adding runtime logic to either is a protocol violation.
AuditFormat— enumerates every bulk-output shape bench scores againstDroidsawSubcommand— typed representation of the top-binary subcommand surface bench invokesDroidsawInvocation+DroidsawFlags— full CLI call description + theto_args()serializer that feedsCommand::argsDroidsawInvocationKind— sealed trait consumed by the downstreamDroidsawRunner<Kind>wrapper (bench-runner-gauge)TOP_BINARY_NAME+ per-subcommand + per-flagconststrings — the rename-to-compile-error hooksSTDOUT_TERMINATOR_SENTINELperAuditFormatvariant — bench asserts presence to detect mid-stream subprocess panics
BSD-3-Clause