VS Code 1.148 Tests a Rust-Based WebAssembly Diff Algorithm, Citing a 2x Median Speedup, and Shrinks Its CLI by 40%
VS Code 1.148 adds an opt-in Rust/WebAssembly diff algorithm Microsoft says is twice as fast at the median, and ships a CLI about 40% smaller.
Overview
Visual Studio Code 1.148, released November 25, 2026, adds an experimental diff algorithm written in Rust and compiled to WebAssembly, which Microsoft’s release notes say computes diffs “more than 2× faster at the median across all diffs, with noticeably fewer slow-tail timeouts” in early rollout measurements. The same release trims the standalone VS Code command-line interface (CLI) to “about 40% smaller, with slight variations per platform,” according to the release notes.
What We Know
The new diff backend ships as a package called @vscode/diff, built from the separate microsoft/vscode-packages repository, and is opt-in rather than the default. Developers can turn it on by setting diffEditor.diffAlgorithm to advanced-wasm, per the release notes. Microsoft says the speed difference is unlikely to be noticeable on a single small file but “shows when reviewing multiple heavily modified files at once in the multi-file diff editor,” according to the same release notes.
The migration has been tracked in public since at least November 17, 2026, in a GitHub issue titled “Adopt the @vscode/diff (wasm) diff algorithm.” The issue lays out explicit goals for the new engine before it can become the default: it must be “correct by construction,” meaning “every diff satisfies edits.apply(original) === modified, including for Unicode text,” with “no exceptions or assertion failures, and no panics in wasm”; it must be “at least as good as today,” matching the existing built-in advanced algorithm or differing only where the difference is understood to be better; and it must be “faster, never blocking,” meaning the WebAssembly path is “at least as fast as advanced at p50 and p95,” honors the existing diffEditor.maxComputationTime setting, and “never stalls the editor worker,” according to the GitHub issue.
That same issue sets out the bar for switching the setting’s default value away from the current advanced engine: the sampled rate of invalid diffs produced by the WebAssembly backend must be “~0 and not more frequent than for advanced,” its computation time must be “at most advanced’s at p50 and p95,” and its timeout rate “not higher,” per the GitHub issue. As of that issue’s open checklist items, an A/B experiment comparing the three available settings — advanced, advanced-external, and advanced-wasm — had already run on VS Code’s Insiders builds, but confirming the experiment and then running a separate experiment on the Stable channel remained open tasks, meaning the new engine is still being evaluated rather than rolled out as the default in 1.148.
To limit the risk of regressions while the new backend is tested, a separate pull request adds a fallback mechanism, described in the pull request as making the @vscode/diff backends “unable to show a worse diff than the built-in algorithm would, so they can be rolled out through an experiment with less risk.” If the package fails to load or throws, “the editor worker reports the error (onUnexpectedError) and computes the diff with the built-in algorithm instead,” and if a sampled verification check — controlled by a setting called diffEditor.experimental.verifyDiffSampleRate, which defaults to 0 and is set by the experiment itself — finds that the package’s diff is invalid, “the built-in diff is shown instead,” according to the pull request. The pull request notes this fallback logic applies only to the package-based backends (advanced-external and advanced-wasm); the current default advanced path is unchanged and incurs no extra overhead.
Separately, 1.148’s release notes describe the VS Code CLI — the standalone executable used to bootstrap Remote SSH connections, some WSL connections, and remote agent hosts from the editor’s Agents window — as roughly 40% smaller than before. Microsoft says the smaller binary should translate into “faster connections and lower resource usage” for users who rely on it to connect to remote machines, per the release notes. The VS Code CLI itself was already written in Rust prior to this release; 1.148’s change is a reduction in the size of that existing Rust binary, not a rewrite into a new language.
What We Don’t Know
Microsoft has not published a target date for making the WebAssembly diff algorithm the default, and the GitHub tracking issue lists the Stable-channel experiment as still pending. The release notes and the tracking issue also do not specify what caused the CLI size reduction beyond attributing it generally to the binary being “Rust-based”; no breakdown of which build changes contributed to the 40% figure is given in either source. Figures describing the diff algorithm’s speed and the CLI’s size reduction come from Microsoft’s own “early rollout measurements” and release notes; no independent benchmark of either change has been published yet.