45int main(
int argc,
char** argv)
58 uint32_t file_size = 0U;
Word search puzzle solver API and bounded workspace definitions.
@ k_soup_max_file_capacity
Maximum supported puzzle file size.
ra8_err_t soup_solve(soup_context_t *ctx, const char *text, uint32_t text_len, ra8_io_stream_t *out_stream)
Parse board and words from puzzle text and emit solutions to the output stream.
ra8_err_t priv_alphabet_soup_load_file_contents(const char *filepath, uint8_t *out_buf, uint32_t buf_cap, uint32_t *out_len)
Private host-file helpers for the Alphabet Soup CLI wrapper.
void main(void)
Secure fallback main entry point.
file_print_exit_code_t
Process exit codes.
@ k_exit_code_error
Error during argument or file I/O.
@ k_exit_code_success
Puzzle solved and output printed.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_io targetable byte-stream facade – one writer, many destinations.
ra8_err_t ra8_io_stream_puts(ra8_io_stream_t *s, const char *str)
Write a NUL-terminated string (without the NUL) to the bound sink.
ra8_err_t ra8_io_stream_flush(ra8_io_stream_t *s)
Flush any sink-side buffering to its destination.
Borrowed raw-descriptor backend for the portable byte-stream facade.
ra8_err_t ra8_io_stream_posix_init(ra8_io_stream_t *stream, ra8_io_stream_posix_state_t *state, int fd)
Bind a borrowed writable descriptor as a byte-stream sink.
Caller-owned state retained by one POSIX stream binding.
Caller-allocated byte-stream handle binding a sink to its context.
Static application workspace allocated in .bss.
soup_context_t solver_ctx
Bounded solver context.
uint8_t file_buffer[k_soup_max_file_capacity]
Bounded file buffer.
Caller-owned bounded workspace for puzzle solving (zero-heap).