Skip to main content

Crate obj_cli

Crate obj_cli 

Source
Expand description

obj-cli — the obj command-line binary’s library half.

run is the entry point: it parses arguments via clap’s derive API, dispatches into the per-subcommand handler, and returns the process exit code the binary should propagate.

Exit codes follow classic Unix conventions:

codemeaning
0success
1“the answer is bad” — content-level failure (corruption)
2“couldn’t even ask” — I/O / missing path / engine error
3argument-parse failure (clap default)

Putting the logic in a library half keeps the binary’s main a thin shim — and makes integration testing via assert_cmd straightforward without exec-vs-fn skew.

Functions§

run
Parse std::env::args() and dispatch into the matched subcommand. Returns the process exit code the binary should propagate to the OS.