-
Notifications
You must be signed in to change notification settings - Fork 129
rexglue CLI Commands
Reference for all rexglue subcommands and their flags.
rexglue <command> [flags] [args]
These flags apply to all commands. They are implemented as CVars and can also be set via environment variables (REXCVAR_<name>) or TOML config.
| Flag | Type | Default | Description |
|---|---|---|---|
--log_level <level> |
string | info |
Log verbosity: trace, debug, info, warning, error
|
--log_file <path> |
string | (none) | Write log output to a file |
--log_verbose |
bool | false |
Override log level to trace (shorthand for --log_level trace) |
--force |
bool | false |
Generate output despite validation errors; skip confirmation prompts |
--enable_exception_handlers |
bool | false |
Enable generation of SEH exception handler wrappers (applies to codegen) |
Initialize a new ReXGlue recompiled project.
rexglue init --app_name <name> --app_root <path> [flags]
| Flag | Type | Description |
|---|---|---|
--app_name <name> |
string | Project name. Must start with a letter; may contain alphanumerics, spaces, underscores, and dashes. Automatically normalized to snake_case, PascalCase, and UPPER_CASE variants for use in generated code. |
--app_root <path> |
string | Directory to create the project in. Created if it does not exist. |
| Flag | Type | Default | Description |
|---|---|---|---|
--app_desc <text> |
string | "" |
Project description |
--app_author <text> |
string | "" |
Author name |
--force |
bool | false |
Overwrite existing directory contents |
Validates the app name, creates the directory structure (src/, generated/), and writes all project files. Fails if the target directory is non-empty unless --force is set.
| File | Description |
|---|---|
CMakeLists.txt |
Build configuration with SDK discovery and rexglue_setup_target()
|
src/main.cpp |
Entry point using REX_DEFINE_APP macro |
src/<app_name>_app.h |
ReXApp subclass with virtual hook stubs |
generated/rexglue.cmake |
SDK integration script (auto-regenerated by migrate) |
CMakePresets.json |
Platform presets: win-amd64-debug, win-amd64-release, win-amd64-relwithdebinfo, linux-amd64-debug, linux-amd64-release, linux-amd64-relwithdebinfo
|
<app_name>_config.toml |
Codegen configuration template with required fields populated |
Analyze an Xbox 360 binary and generate recompiled C++ code.
rexglue codegen <config.toml> [flags]
| Argument | Description |
|---|---|
<config.toml> |
Path to the TOML configuration file (positional, required) |
Loads the XEX or ELF binary specified in the config, runs the analysis pipeline to discover functions and resolve control flow, then generates PPC-to-C++ recompiled source files. See rexglue CLI Configuration File for all TOML options and Codegen Pipeline Overview for details on the analysis stages.
If --enable_exception_handlers is passed, SEH exception handler wrapper generation is enabled regardless of the TOML setting.
Returns a non-zero exit code on validation failure unless --force is used, in which case output is generated despite errors.
Upgrade an existing project to the current SDK version.
rexglue migrate --app_root <path> [flags]
| Flag | Type | Description |
|---|---|---|
--app_root <path> |
string | Path to the existing project root |
| Flag | Type | Default | Description |
|---|---|---|---|
--force |
bool | false |
Skip confirmation prompt when migrating old-style projects |
- Reads the project name from the
*_config.tomlfile in the project root. - Always regenerates
generated/rexglue.cmaketo match the current SDK version. - Detects old-style projects (those missing
generated/rexglue.cmake) and offers to migrate them:- Creates
.bakbackups ofsrc/main.cpp,CMakeLists.txt, and the app header before overwriting. - Writes updated versions of these files using the current templates.
- Without
--force, prompts for confirmation before modifying user-owned files.
- Creates
- If the project already uses the current layout and all user files exist, only
generated/rexglue.cmakeis updated.
Generate Catch2 unit tests from PPC assembly test specifications.
rexglue recompile-tests --bin_dir <path> --asm_dir <path> --output <path>
| Flag | Type | Description |
|---|---|---|
--bin_dir <path> |
string | Directory containing linked .bin files and corresponding .map symbol files |
--asm_dir <path> |
string | Directory containing .s assembly source files with test specification directives |
--output <path> |
string | Output directory for generated C++ test files |
Parses PPC assembly source files for register and memory input/output directives (#_REGISTER_IN, #_REGISTER_OUT, #_MEMORY_IN, #_MEMORY_OUT), recompiles each function from the corresponding .bin files, and generates Catch2 test cases with assertions matching the expected outputs.
| File | Description |
|---|---|
ppc_config.h |
Image constants for the test binaries |
ppc_test_functions.cpp |
Recompiled test function implementations |
ppc_test_decls.h |
Forward declarations for test functions |
ppc_test_cases.cpp |
Catch2 test cases with register/memory assertions |
ReXGlue SDK
CLI Reference
Recompilation Pipeline
Runtime Architecture
Technical Reference