Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[wasm] Set flutter_runtime_mode in tools/gn to_gn_wasm_args

Open Beginner friendly
#193,406 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
wasm
Domain
build-system

Research direction

Start in engine/src/flutter/tools/gn, specifically the to_gn_wasm_args function, and run engine/src/flutter/tools/gn --web --runtime-mode=release. Inspect out/wasm_release/args.gn to verify how flutter_runtime_mode is evaluated. Done means the release argument is reflected as "release" for Wasm targets instead of defaulting to "debug".

Written by the indexing model from the issue text.

Description

Summary

The engine/src/flutter/tools/gn build script ignores the --runtime-mode argument for WebAssembly (--web / wasm) targets. As a result, Wasm builds (including wasm_release / skwasm / Web Impeller) implicitly evaluate flutter_runtime_mode as "debug" globally inside GN even when --runtime-mode=release is passed.

For Web Impeller (Wimp), this evaluates impeller_debug = true (IMPELLER_DEBUG=1), causing debug tracing mechanisms (such as RenderPassGLES::EncodeCommandsInReactor executing synchronous gl.CheckFramebufferStatusDebug(GL_FRAMEBUFFER) 50+ times per frame) to pollute release artifacts and cause severe frame-bound GPU stalls in release Wimp targets.

Steps to Reproduce
  1. Execute engine/src/flutter/tools/gn --web --runtime-mode=release
  2. Search out/wasm_release/args.gn or inspect the GN evaluation tree.
Observed Behavior
flutter_runtime_mode defaults to "debug", activating IMPELLER_DEBUG=1.
Expected Behavior

flutter_runtime_mode evaluates to "release", de-activating IMPELLER_DEBUG and yielding an optimized Wasm payload free of synchronous GL verification commands.

Environment / Target
  • Target OS: wasm (--web / wimp / skwasm)
  • Build Script: engine/src/flutter/tools/gn (to_gn_wasm_args)
Dominant language
Dart
Stars
179k
Forks
31.7k
Avg merge
2d 8h
Merged PRs (30d)
396

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flutter/flutter

All issues in flutter/flutter

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.