Integrate your build
Choose analysis alongside your build, or checking inside the compiler invocation.
Analyze a compilation database
Section titled “Analyze a compilation database”For CMake projects using Ninja or Makefiles:
cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ONcmake --build buildweavec -p build src/main.cweavec --whole-program -p buildcompile_commands.json supplies each source file’s compilation flags. The whole-program command selects all sources in the database when no explicit source list is given. Keep the database current when the build configuration changes.
Use the compiler driver with Make
Section titled “Use the compiler driver with Make”make cleanCC=weavec-cc makeThe Makefile must honor CC for compilation and linking. If it assigns CC unconditionally, use make CC=weavec-cc. If it invokes ld directly at the link step, route linking through weavec-cc to perform whole-program checks.
Use the compiler driver with CMake
Section titled “Use the compiler driver with CMake”Use a fresh build directory so CMake detects the new compiler:
cmake -S . -B build-weavec -G Ninja -DCMAKE_C_COMPILER=weavec-cccmake --build build-weavecThe driver forwards ordinary compiler options to Clang. WeaveC options use the -fweavec-* and -W*weavec* forms listed in the command-line reference.
Keep object sidecars
Section titled “Keep object sidecars”Compiling buffer.c produces both buffer.o and buffer.o.weavec. Keep the sidecar beside its object. At link time, WeaveC uses those summaries and validates recorded inputs before replaying analysis.
Rebuild objects when their source, headers, command, or sidecar format changes. A source-only reanalysis cannot prove that an older object matches new source. Ordinary archives do not yet transport member sidecars automatically; see checked-build limits.
Add checks to CI
Section titled “Add checks to CI”After installing WeaveC and preparing the build configuration, run the same command locally and in CI:
weavec --whole-program --checked-function=main \ --checked-report=build/weavec-safety.json -p buildLet a nonzero exit status fail the job and retain the JSON report as a build artifact. Select the actual entry points or components you intend to check; not every existing codebase will immediately satisfy checked mode.