Skip to content

Gate the GPU renderer behind the runtime feature - #53

Merged
pathscale merged 1 commit into
masterfrom
fix/gate-the-renderer
Sep 7, 2026
Merged

pathscale merged 1 commit into
masterfrom
fix/gate-the-renderer

Conversation

@pathscale

Copy link
Copy Markdown
Owner

anyrender_vello was a hard dependency. mod runtime is the only thing that names VelloWindowRenderer, and that module is already behind the runtime feature — so the renderer was reachable by exactly the consumers who could never use it.

A headless build linked wgpu, wgpu-hal, wgpu-core, naga and two versions of vello to serve a socket that reads a semantic tree.

qa-inspect-host did everything a consumer can do — default-features = false, features = ["agent-control"] — and still got a GPU stack, because no feature governed the dependency.

Same shape as system-fonts

The intent was written down, in this feature's own comment:

Off, a headless consumer gets the inspection and activation surface with no Tauri in its graph, which on Linux is the difference between a build and GTK development headers for a binary that never opens a window.

Nothing enforced it, so it was not true. system-fonts sat in blitz-dom's default list the same way.

The change

anyrender_vello becomes optional and joins runtime. No code changes — every use site was already gated.

Measured on x86_64-unknown-linux-gnu, matching wgpu, naga and the GPU vello:

configuration count
--no-default-features --features agent-control 0
--features runtime 58

The gate that should have caught it

"No window stack in the graph" looked for tauri v|gtk|glib|webkit|soup and passed a build carrying wgpu. It now looks for renderers too, and pins the target rather than inheriting the runner's. Verified to discriminate: 0 headless, 58 with runtime.

Deliberately still allowed: ps-anyrender-vello-cpu

It arrives through blitz-script behind debug-control, which serves the screenshot endpoint. Splitting screenshot out of debug-control in ps-blitz is the follow-up that lets this be banned too; it is a ps-blitz change and needs a release before this repository can tighten the grep.

Verified

Headless clippy clean, --all-features checks (which is what crates.io verifies with). Releases 0.3.5.

`anyrender_vello` was a hard dependency. `mod runtime` is the only thing that
names `VelloWindowRenderer`, and that module is already behind the `runtime`
feature, so the renderer was reachable by exactly the consumers who could never
use it: a headless build linked wgpu, wgpu-hal, wgpu-core, naga and two
versions of vello to serve a socket that reads a semantic tree.

`qa-inspect-host` did everything a consumer can do -- `default-features =
false`, `features = ["agent-control"]` -- and still got a GPU stack, because no
feature governed the dependency.

Same shape as `system-fonts` sitting in `blitz-dom`'s default list. The intent
was written down, in this feature's own comment: "a headless consumer gets the
inspection and activation surface with no Tauri in its graph ... for a binary
that never opens a window". Nothing enforced it, so it was not true.

Optional, and added to `runtime`. No code changes: every use site was already
gated.

Measured on x86_64-unknown-linux-gnu, matching wgpu, naga and the GPU vello:

  --no-default-features --features agent-control    0
  --features runtime                               58

The graph check is why this survived. It looked for `tauri v|gtk|glib|webkit|
soup` and passed a build carrying wgpu, so it now looks for renderers as well,
and pins the target rather than inheriting the runner's.

`ps-anyrender-vello-cpu` is deliberately still allowed. It arrives through
`blitz-script` behind `debug-control`, which serves the `screenshot` endpoint,
and rasterising is what that endpoint is for. Whether a pure inspection host
should offer screenshots at all is a separate question and not one a grep
should decide.

Breaking for anyone depending on this crate with `default-features = false` and
relying on the renderer being present regardless; they enable `runtime`.

Headless clippy clean, `--all-features` checks. Releases 0.3.5.
@pathscale
pathscale merged commit 6c8c7d5 into master Sep 7, 2026
3 checks passed
@pathscale
pathscale deleted the fix/gate-the-renderer branch September 7, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant