Repository navigation
Embed the WebView2 bootstrapper instead of downloading it at install time - #7820
Merged
Merged
Conversation
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The installer currently uses Tauri's downloadBootstrapper default, so when WebView2 is missing it runs NSISdl::download against a Microsoft fwlink and then ExecWaits the result. Fetching an executable and running it is the most dropper-shaped thing in the bundle, and it is a heuristic cost paid on every release. embedBootstrapper ships the bootstrapper inside the installer instead, for about 1.8MB. Any remaining download is done by a Microsoft-signed binary rather than by our NSIS stub. offlineInstaller would remove the network need entirely but costs 127MB and would push the bundle past the 50MB cap on Microsoft submissions. The registry check is unchanged, so on Windows 11 and most Windows 10 machines WebView2 is already present and none of this runs.
danielhanchen
force-pushed
the
desktop-embed-webview2-bootstrapper
branch
from
August 4, 2026 09:39
585e53b to
96450a3
Compare
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
bundle.windows.webviewInstallModeis currently Tauri's default,downloadBootstrapper. This switches it toembedBootstrapper.Why
With the default, when WebView2 is missing the installer does this (
studio/src-tauri/windows/installer.nsi):Fetch an executable from the internet, then run it silently. That is the most dropper shaped behaviour in the bundle, and it is a heuristic cost paid on every release regardless of whether the download ever happens.
embedBootstrapperships the bootstrapper inside the installer instead, for about 1.8MB. Whatever downloading remains is done by a Microsoft signed binary rather than by our NSIS stub.offlineInstallerwould remove the network requirement entirely, but it costs about 127MB, which would also push the bundle past the 50MB cap on Microsoft false positive submissions.Scope
The registry check ahead of it is unchanged:
WebView2 ships preinstalled on Windows 11 and was rolled out to Windows 10, so on the large majority of machines none of this path runs at all. This is about the fallback.
Honest framing
This is hardening, not a fix for a specific report. The behaviour is present in both
0.1.51-betaand0.1.512-beta, so it does not explain any difference between them, and I have no measurement showing it flips a scanner verdict. It removes a download and execute step we do not need to own, and 1.8MB is a fair price for that.