Skip to content

Migrate the v3 Windows runtime from pkg/edge to the generated pkg/webview2 bindings #5769

Description

@taliesin-ai

Goal

Migrate the Wails v3 Windows runtime from the hand-maintained pkg/edge bindings to the generated pkg/webview2 bindings, then retire pkg/edge.

Background

PR #5768 landed the overhauled binding generator and the generated bindings at v3/internal/webview2/pkg/webview2 (following the module fold #5711). Those bindings are currently dormant — nothing in the runtime imports them; the runtime still drives WebView2 entirely through pkg/edge + webviewloader.

The generated bindings are validated at their own layer (100%-covered generator, 1,020+ hermetic ABI tests, a live smoke test against the real DLL, and three example apps), but they have not been exercised as the production WebView2 driver.

Plan (from v3/internal/webview2/ARCHITECTURE.md)

  1. Land the generator + tested pkg/webview2 — done in feat(webview2): port generator overhaul, generated tests and examples to v3/internal/webview2 #5768.
  2. Refactor v3/pkg/application/... (chromium.go and friends) to import pkg/webview2 instead of pkg/edge.
  3. Carry forward the pkg/edge runtime behaviour that the generator does not produce (it emits bindings, not orchestration/policy):
  4. Once the runtime is on pkg/webview2, move/remove pkg/edge.

Testing considerations

  • Fix the flaky pkg/edge integration test TestCookieManager while migrating (it CoInitializes without runtime.LockOSThread(), so a goroutine thread-migration mid-test yields "CoInitialize has not been called" and hangs to the 10-minute timeout — observed on CI).
  • Add real-DLL coverage across more than the handful of interfaces the live smoke test exercises today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions