sincecutoff.com
← all changes

shopify app function run supports --profile

Introduced 2026-08-19 · score 0.97

HOW TO USE IT

When you have a built function and valid JSON input, run it with `--profile` to generate a WebAssembly performance profile. Open the `.perf` file from the function directory in Speedscope.

shopify app function build shopify app function run --export <export> --input <input.json> --profile
shopify app function run --export run --input input.json --profile

WHY THIS HELPS

Inspect WebAssembly performance for a function you are running locally.

BEFORE THIS CHANGE

Run `shopify app function run` without generating a WebAssembly performance profile.

REQUIREMENTS AND LIMITATIONS

  • Version: 4.7.0
  • --profile: Generate a WebAssembly performance profile for the run; profile can be viewed in Speedscope. Environment variable: `SHOPIFY_FLAG_PROFILE`.
  • --input, -i <value>: JSON input to pass to the function; if omitted, standard input is used. A valid input is needed for this profiling task.
  • --export, -e <value>: Name of the WebAssembly export to invoke.
  • Prerequisite: Build the function first; `app function run` executes the already-built WebAssembly module.
  • Prerequisite: Provide valid JSON input; the command accepts input via `--input` or standard input.
  • Prerequisite: Load the generated `.perf` file in Speedscope. Shopify CLI writes it to the function directory, named after the WebAssembly module.
  • A valid input is required.
  • The built WebAssembly module may lack a function name section, which makes profiles difficult to interpret and triggers a warning before profiling.
  • JavaScript functions' Javy output does not include function names regardless of the `wasm_opt` setting.
  • Docs conflict: The current Shopify CLI docs show `--profile` and a profiling example, but do not state the CLI version. The release note establishes that the flag was added in 4.7.0.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card