21typedef enum : uint8_t {
38 " ra8_fmt convert --format <fmt> --in <file> --out <file>\n"
39 " ra8_fmt inspect <container> [--verbose]\n"
40 " ra8_fmt verify --format <fmt> --in <file> [--out <dump.ppm>]\n"
42 " jof .jof [convert] [inspect] [verify] band-tile atlas (JOF): "
43 "display-native, O(1) random access per tile\n"
44 " rabook .rabook [inspect] chunked book container (RBKC): compiled "
46 "one unit = one book\n";
63 (void)errors->write(errors->ctx, (
const uint8_t*)
s_usage,
sizeof(
s_usage) - 1U);
105 bool handled =
false;
void main(void)
Secure fallback main entry point.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Raw file-descriptor adapters for the portable format-tool contracts.
void priv_fmt_host_log_byte(void *ctx, uint8_t byte)
Adapt a logging byte to an injected raw-fd sink.
ra8_fmt_sink_t priv_fmt_host_fd_sink(ra8_fmt_host_fd_sink_t *state)
Obtain the exact-write portable sink for a raw descriptor.
Caller-workspace CLI composition for every supported tool verb.
int priv_fmt_try_portable_convert(int argc, char **argv, uint8_t *arena, size_t arena_cap, bool *handled)
Try the caller-workspace JOF-convert command path.
@ k_ra8_fmt_cli_convert_arena_bytes
Convert prefix (8 MiB).
int priv_fmt_try_portable_verify(int argc, char **argv, ra8_fmt_cli_workspace_t *workspace, bool *handled)
Try the bounded two-spool JOF-verification command path.
int priv_fmt_try_portable_inspect(int argc, char **argv, ra8_fmt_cli_workspace_t *workspace, bool *handled)
Try strict streamed JOF or RBKC inspection.
Lightweight Logging Interface for ra8-firmware.
void ra8_log_set_byte_sink(ra8_log_byte_sink_fn_t fn, void *ctx)
Install (or clear) an optional byte sink for log output.
static void internal_usage(void)
Print CLI usage and the explicit compiled cache ceiling.
One explicit, shared composition-root workspace for portable verbs.
Append sink backed by a caller-owned descriptor.
Injected append-only sink.
static int internal_dispatch(int argc, char **argv, bool *handled)
Try every portable dispatcher in stable command order.
static ra8_fmt_cli_workspace_t s_cli_workspace
Existing explicit high-water shared by mutually exclusive CLI verbs.
main_exit_t
Process status returned when no supported command owns the input.
@ k_main_exit_usage
Invalid or unsupported command line.
static const char s_usage[]
Established usage banner and supported-format inventory.