Star99 guide examples

Edition: 23 October 2026, matching the compiler linked from the guide.
Guide: https://control-core.com/tmp/star99
Compiler source: https://control-core.com/tmp/star99.c

Build the compiler:

    cc -std=c99 -O2 star99.c -lm -o star99

Run single-file examples from the folder containing the sources:

    /path/to/star99 hello.star99
    ./hello

Compile directory examples from this folder:

    /path/to/star99 modules
    ./modules/modules
    /path/to/star99 parameterized
    ./parameterized/parameterized

Every named single-file example is independent. The modules/ and
parameterized/ folders each include their own main and library files.
Expected output appears alongside examples in the guide.

inspection.star99 prints during compilation, on the compiler's stderr.
output.star99 also writes a status line to the executable's stderr.
library-helpers.star99 writes sample.txt in the current working directory.

algebra.star99 requires tcc unless STAR99_CC overrides its compiler choice.
Its build hook intentionally formats its source before compiling it.

multiple-main.star99 builds three separate executables:

    ./multiple-main       # app run 1
    ./demo-simulate       # simulation run 1
    ./demo-self_test      # tests passed run 1

Each executable has its own initial global state.

draw-hooks.star99 builds its normal executable plus draw-replay, and runs
one empty-input replay. This exercises custom input builders without
AFL++. A coverage-guided fuzz campaign requires the compatible external
AFL++/LLVM tools described in the guide.

C plugins and libraries (see the guide's C plugins section):

    /path/to/star99 net-loopback.star99    # TCP on 127.0.0.1 only
    /path/to/star99 sdl3-canvas.star99     # needs SDL3, SDL3_ttf; no screen
    /path/to/star99 pylogix-tags.star99    # against lib/plcsim on 127.0.0.1
    cd c-plugin && /path/to/star99 main.star99 && ./main

plugins/net, plugins/sdl3, lib/pylogix, lib/plcsim and tools/ are copies
of the libraries and tools that come with the compiler. pylogix talks to
real Allen-Bradley PLCs: the example only talks to the simulator,
lib/plcsim, in a child process on 127.0.0.1.

The projectional editor needs SDL3, SDL3_ttf and fontconfig:

    cd tools && /path/to/star99 edit.star99
    STAR99=/path/to/star99 tools/edit twice.star99

The archive contains source and this README, with no generated executables.
