Skip to main content

Engine binary flags

The rn-impeller binary is the C++ engine host that run-impeller launches for you. The following sections list its user-facing flags. Run rn-impeller --help to see the full list. The full usage text also lists flags for the engine's test harness (synthetic input injection, self-tests, draw-op dumps). Those flags aren't listed here because they're not meant for an app developer to pass.

Required​

To launch the engine directly, pass the following required flags:

rn-impeller --bundle BUNDLE_PATH --app-name APP_NAME

Replace BUNDLE_PATH with the absolute path to the Metro bundle to load, and APP_NAME with the app's display name. The following table describes these flags:

FlagTypeDefaultDescription
--bundleabsolute pathnone, requiredThe Metro bundle to load. run-impeller always passes this as an absolute path; the engine has no working-directory fallback.
--app-namestringnone, requiredThe app's display name.

Window and display​

The following table lists the flags that control the engine's window and display:

FlagTypeDefaultDescription
--headlessflagoff (windowed)Render without opening a window.
--windowflagoffOpen a window explicitly (used together with the test-harness flags, which otherwise imply headless).
--width / --heightinteger (N)engine defaultFramebuffer size in pixels.
--scalenumber (N)1 headless; the display's real framebuffer/window ratio windowedDevice pixels per point. Windowed, this overrides the display's natural ratio, so a probe that asserts pointer coordinates against layout points should only pass it deliberately.
--titlestring"React Native (Impeller)"Window title; also the macOS Window menu entry.
--color-schemelight | darkengine defaultForces the app's color scheme.
--initial-urlURLunsetURL the app's deep-link handling receives at launch.
--screenshotpath (.ppm)unsetWrite a screenshot to this path.

Rendering backend and quality​

The following table lists the flags that control the rendering backend and quality:

FlagTypeDefaultDescription
--backendgles | metal | vulkanmetal on darwin windowed, gles elsewhereGPU backend to render with.
--supersample-rnsvginteger (N)4 on darwin and Windows, 0 (off) elsewhereOffscreen supersample factor for stroked SVG icon antialiasing on backends with no surface-level MSAA. For more information, see Styling.
--sdf-aaon | offoffAnalytic SDF antialiasing for circles, ovals, rects, and rounded rects (Impeller's Flags::use_sdfs).
--prewarmon | offonRun a pipeline pre-warm pass before the first frame.

Resource budgets​

The following table lists the flag that controls the image cache budget:

FlagTypeDefaultDescription
--image-cache-mbinteger (N)100Decoded-image LRU cache budget, in MB. Also settable with the RNI_IMAGE_CACHE_MB environment variable.

The following table lists the related environment variables:

Environment variableTypeDefaultDescription
RNI_IMAGE_CACHE_MBinteger100Same as --image-cache-mb.
RNI_IMAGE_CACHE_FLOOR_MBinteger0Minimum cache size kept during a low-memory purge.
RNI_FONT_DIRSpath listunsetExtra font directories for the Linux font resolver, same effect as --font-dir. For more information, see Fonts and text.

Profiling​

The following table lists the flags that write profiling data:

FlagTypeDefaultDescription
--frame-timings-outpath (.json)unsetWrite one timing record per presented frame.
--trace-outpath (.json)unsetWrite a Chrome/Perfetto trace of spans and counters.

Self-test and diagnostic modes​

To print the TurboModule seam as a machine-readable manifest without loading a bundle, run the following command:

rn-impeller --list-modules

--test-openurl, --test-urlparse, and --test-http run the engine's networking and URL-handling self-tests the same way. None of the four take a --bundle flag.