Skip to content

Add typed native desktop capability ABI - #184

Merged
wieslawsoltes merged 1 commit into
mainfrom
feature/native-desktop-capability-abi-main
Sep 16, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
feature/native-desktop-capability-abi-main

Conversation

@wieslawsoltes

@wieslawsoltes wieslawsoltes commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Problem and resulting behavior

Native WebScene hosts need a browser-shaped, versioned boundary for clipboard and desktop window operations. The legacy string request path could not safely carry binary clipboard data, complete awaited operations, bind requests to a realm/navigation generation, or report lifecycle and fullscreen state.

This change adds one typed request/completion ABI shared by both capability families. Clipboard supports Promise-based text and typed MIME/byte operations, ClipboardItem, native copy/cut/paste events, cancellation, stale and duplicate completion rejection, navigation/teardown ownership, bounded queues, and a compatibility fallback. Window capabilities cover external URLs, close, focus, fullscreen enter/exit, visibility/focus/fullscreen publication, and standard events.

Issue mapping

The ABI is shared deliberately: clipboard and window operations use the same request identity, completion, realm ownership, cancellation, and queue-bound machinery.

Scope

  • One focused commit on current main at 755d88c918bd245f8d29b0a9166e51d656913f85
  • Exact head: 4b61f2102c6aa987045d5d3ddd4b0ceb973bf909
  • 26 files; stale PR history, the removed documentation file, and the dependent Diagnose native worker crash during legacy clipboard completion #89 diagnostics/teardown layer are excluded
  • Generated WebIDL catalog updated deterministically to 21 interfaces and 182 members
  • Adds the desktop-host-capabilities focused native filter so this ABI can be qualified without the broad product matrix

Validation

  • Release V8 native engine build
  • Focused native capability filter: 5/5 passes
  • 10,000 focus transitions: 0.17-0.22 ms
  • 10,000 typed window requests: 1.0-2.1 ms
  • 16 MiB maximum clipboard payload: 79-96 ms
  • 10,000 typed clipboard round trips: 34.9-41.2 ms; pending high-water 16; no retained request
  • Native binary interop tests: 2/2
  • Cumulative Release compatibility architecture tests pass in the dependent local layer
  • Native workflow policy tests: 6/6
  • WebIDL generator check, shell syntax check, and git diff --check pass

Stack

This is layer 1 of the native desktop capability stack. The cumulative diagnostics/focus layer is validated remotely before the stack is merged atomically. Draft consolidation PR #76 remains open and unmerged.

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.

Complete host-driven native close veto lifecycle Add a bounded async Clipboard API host ABI for native runtimes

1 participant