Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

cargo-reaper-run

NAME

cargo-reaper-run -- Run REAPER extension plugin(s).

SYNOPSIS

cargo-reaper run [options] [cargo_build_args]...

DESCRIPTION

Compile extension plugins and open REAPER.

This is effectively shorthand for running cargo-reaper-build then opening REAPER, which will make changes to your extension plugins take immediate effect.

cargo-reaper-run will attempt to use the REAPER binary executable on $PATH if it's available, otherwise falling back to the platform specific default global installation path. If for some reason the default installation is not working, please see the options below for manually specifying a path to a REAPER binary executable.

OPTIONS

-e path
--exec path

Override the REAPER executable file path.

-o path
--open path
--open-project path

Open a specific REAPER project file.

--no-build

Do not build plugin(s) before running REAPER.

-t duration
--timeout duration

The amount of time to wait before closing REAPER, in human-readable format (e.g. 10s, 2m, 1h).

--stdin stdio

Configuration for the child process’s standard input (stdin) handle.

--stdout stdio

Configuration for the child process’s standard output (stdout) handle.

--stderr stdio

Configuration for the child process’s standard error (stderr) handle.

-h
--help

Print help information.

ADDITIONAL LINUX OPTIONS

The following options require xserver to be configured and have Xvfb and xdotool installed. These options are intended to enable testing in headless environments and to make it easier to assert the state an extension plugin reaches.

--headless

Run REAPER in a headless environment.

-D display
--display display

The virtual display that should be used for the headless environment. Can also be passed with the DISPLAY environment variable, e.g. DISPLAY=:99.

-w title
--locate-window title

Locate a window based on its title and exit with status code 0 if found.

--keep-going

Continue until the specified timeout, even after a window is located.

EXAMPLES

  1. Build a package or workspace containing a REAPER extension plugin and all of its dependencies, and open REAPER.
cargo reaper run
  1. Build only the specified package in a workspace containing a REAPER extension plugin with optimizations for x86_64 Windows, and open REAPER.
cargo reaper run -p reaper_my_plugin --lib --release --target x86_64-pc-windows-msvc
cargo reaper run -- -p reaper_my_plugin --lib --release --target x86_64-pc-windows-msvc

Note that arguments passed to the cargo-build invocation must be trailing. These may be passed directly, or as positional arguments.

  1. Run REAPER in a headless environment through Xvfb on Linux, and attempt to locate a window.
DISPLAY=:99 cargo-reaper run --headless \ # open REAPER on Xvfb display 99
  --no-build \                            # but don't build any plugins
  --open /path/to/my_project.RPP \        # open a pre-saved project (maybe with state that affects how the plugin behaves)
  --locate-window "error: expected ..." \ # and locate an error window and exit successfully
  --timeout 15s \                         # but only run REAPER for a maximum of 15 seconds
  --keep-going \                          # and don't exit until the timeout is reached (even if the window is found)
  --stdout null \                         # do not print Xvfb or REAPER info to stdout
  --stderr null                           # do not print Xvfb or REAPER errors to stderr

TIP: The above assumes the extension plugin is already installed, skipping the build phase. This can be particularly useful since it doesn't require configuring a rust toolchain in order to build the plugin prior to testing it.