v4 / vlib / v2_toberemoved / tests / target_codegen_example / README.md
35 lines · 27 sloc · 1.57 KB · c0624b274a458fe3e487d89ae9554c2e8c25bdb6
Raw

Target Codegen Example

This is a V2 fixture for target-specific cleanc generation.

It is intentionally stored as .vv2 source so shared V1/vfmt paths do not parse V2-only or experimental command-line contracts directly. The builder E2E test reads these files, writes them as temporary .v files, and runs the real cmd/v2 CLI.

The fixture is a compact demonstration of the supported user-facing contract:

V2 uses cleanc by default. -b is only needed when selecting a non-default backend explicitly.

The regression tests keep unsupported/error-only programs inline in the test file, so this directory stays readable as an example rather than a catalogue of expected failures.

Fixture roles: