hawk.embedded

hawk.embedded#

The standalone C target: hawk kernels rendered as freestanding MISRA-C instead of aether expression templates. The package holds the C writer (writer), the spelling tables (spelling), the runtime helpers (helpers), the header and ABI layout (abi), the verification harness (verify), the rule audit (audit), the toolchain driver (toolchain) and the target profile (profile).

Functions

check(…)

Run the C compiler (-std=c99 and -std=c11, strict flags) and cppcheck's MISRA addon over source in a temp dir: the report's checks block (hawk.embedded.toolchain.run_checks()).

export(…)

Export kernel as <name>.c, <name>.h and <name>.embedded.json in directory.

finish_report(…)

The <name>.embedded.json document for an audited source whose toolchain checks block (check(), or {"skipped": ...}) is in hand: the render's report plus the deviations, the clean audit and the checks made stable (no run time, no temp directory), in REPORT_KEYS order.

refuse_audit_hits(…)

Run the text audit (hawk.embedded.audit.audit()) over source and refuse any hit with rule audit.<kind>: the step every door (export(), build_bundle(targets=("c",))) runs before it writes or publishes anything.

render(…)

Render kernel as a standalone C .c/.h pair.

report_text(…)

The exact text a <name>.embedded.json is written as: indented JSON in the report's own key order, no NaN, one trailing newline.

Classes

EmbeddedArtifact

One exported C unit: the kernel name, the directory it was written to, the three file paths and the report as written.

EmbeddedProfile

Caps and policies for one C export (see hawk.embedded.verify).

EmbeddedSource

One rendered C unit: the .c text, the .h text, the bare body (the renderer's output, indented for the sample loop), the verify report the render completed, the kernel name and the scalar mode id.