Skip to content
GUIDES

Select functions

Terminal window
weavec --checked-function=main main.c --
weavec --whole-program --checked-function=main main.c helpers.c --
weavec --checked --checked-report=safety.json module.c --

Repeat --checked-function to name several definitions. A missing name fails the invocation. --checked selects definitions in input files; --analyze-headers extends module selection to header definitions. A specifically named or annotated header function is reported even without that flag. Unannotated helper bodies contribute contracts whenever checking is enabled.

Selection can also live in source:

#include <weavec.h>
WEAVEC_CHECKED int get(unsigned index) {
int values[4] = {10, 20, 30, 40};
if (index >= 4) return 0;
return values[index];
}

WEAVEC_CHECKED requests a body check. Adding it to an unavailable function’s declaration does not prove that function or grant its caller a trusted contract.