runner: --describe prints a core's options and input labels, no ROM needed - #1
Merged
Merged
Conversation
…eeded `retro-core-runner --describe --core <lib> [--package <shim>]` loads the core and checks its .rcore.toml exactly as a run does, then prints what it declares -- options (type, flags, default, range, label, description, enum values) and input descriptors -- as TAB-separated records, one per line, with \ TAB LF CR escaped. It never calls init, load or deinit, so a frontend can build a settings page from the core's own declarations without a ROM or a session. `--version` gains `describe 1`, and runner_probe reads it into RunnerVersion::describe (0 for older runners), so a host can tell support before asking. Tests: five runner_describe_* cases compare stdout byte for byte (plain, package, package_none, unwanted, no_core); the fake cores now declare options and inputs whose fields carry a TAB, LF, CR and backslash. Format and checks documented in docs/CORE_RUNNER.md, the --version key in docs/RELEASES.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 1.1) and #2 (build-local) runner_main.cpp: keep main's pkg_sha (declared outside the package block, for the state keeper) and --describe's exemption from the package requirement. build-local.sh --test: 18/18; --describe on n64lle's generic core with the Pokemon Stadium package prints 76 options and 16 inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
retro-core-runner --describe --core <lib> [--package <shim>]prints what a core declares — its options and input descriptors — without a ROM and without running a session.--versiongainsdescribe 1so a host can check for support first, andrunner_probeexposes it asRunnerVersion::describe.This is what retro-hub's new settings page is built from (Retro-Launcher
feat/direct-home): labels, choices and button names come from the core, not from a list compiled into the hub.Behaviour
.rcore.tomlchecked exactly as for a run; a mismatch still exits 2.options()andinput_descriptors()are read, and nothing else: noinit,loadordeinit, and--outis not created.rcore.hdeclares both "read before load".--packageis validated as usual: refused on a core withoutgame_package, and the file must be readable.Format (docs/CORE_RUNNER.md)
One record per line, TAB-separated, with
\, TAB, LF and CR escaped:Tests
runner_describe_*cases (plain,package,package_none,unwanted,no_core). They compare stdout byte for byte, and the fake cores now declare fields carrying TAB, LF, CR and backslash.Open
The ABI never says how an
RCORE_OPT_BOOLvalue is spelled.--describeprints the core's default as given; the hub only draws a checkbox when that default shows the spelling.🤖 Generated with Claude Code