LYR-RT0021
an integer from C that no variant of the enum stands for
A C function declared to return a @Layout enum returned an integer that is none of the enum's variants. A C enum may hold any integer of its type; a Lyric enum holds one of its variants, the first as 0, the next as 1, in the order they are written.
Explanation
A @Layout(C) or @Layout(uint8) enum crosses into C as the integer of its variant — the first variant written is 0, the next 1 — and comes back the same way. Where C returns an integer outside that range, the value is no variant of the enum, and the program stops before a match meets it. Declare the C function's result as the integer type and decide in Lyric what an unknown value means.
Example
$ ./out/debug/x86_64-linux-gnu/app
panic [LYR-RT0021]: C returned 7, which is no variant of app.main.Color (it has 3)