Skip to content

Choose where Player code belongs

Before changing Player behavior, decide whether the change concerns presentation, shared native behavior, or a host’s operating system. The accepted Player Core contract defines that boundary and the review sequence. Generic IDs, digests, bounded values, timestamps, and capability vocabulary live in crates/player-types. Edge still owns the wire protocols and supplies clocks and random ID generation. Durable metadata lives in crates/player-state. Its migrations include historical Edge tables, while Linux update, network recovery, and legacy import repositories stay in edge-state::platform. The content store lives in crates/player-cas. It owns verification, resume, pins, eviction, and crash reconciliation. Edge supplies Linux free-space measurements through the store’s narrow SpaceProbe interface. Server transport lives in crates/player-client. Hosts supply product identity, device metadata, and private storage. Edge keeps its credential and pairing files and its Electron import. Stored credentials are sent only after the client verifies the installation identity.

Shared native behavior lives in crates/player-core: pairing, server reconciliation, manifest preparation, configuration acceptance, offline activation, native selection, commands, Activity reporting, telemetry policy, and renderer recovery. Edge constructs one PlayerCore with shared services and connects Linux adapters to its domain drivers. Hosts supply clocks and fresh IDs; Core persists identity and correlates requests.

Edge retains private stores, hardware access, renderer transport, Runtime projection, status payloads, and lifecycle. Display scheduling and non-secret network-assignment decisions run in Core; CEC/DDC, NetworkManager, provisioning credentials, and radio recovery stay in Edge.

Prepared activations carry bounded, opaque Runtime presentation data with verified-object bindings. Core owns explicit requirements and evidence metadata; transitions, Website options, Layout properties, and status styling stay with Runtime and the host projection. Edge uses these through its RendererPort adapter, with a temporary projection bridge in Edge. The Edge port owns media grants and their generation lifecycle. Separate packaged and connected profiles keep release support distinct from what a renderer session advertises. Core checks both before activation. Runtime reports live support in readiness, including discovered Widget versions. WPE forwards this report; generated release metadata remains the packaged source. The RendererPort interface now defines semantic operations. Edge uses shared decoded-image checks and keeps transport decoding in Edge. Core serializes captures and checks protected states. Periodic preview leases, uploads, capability policy, and fault suspension also run in Core. Watch Live lease, cadence, and frame coordination also run in Core. Edge owns wire command results; Core correlates pending commands and owns timeout, disconnect, and startup Website data-clear retry policy. Edge also owns media transport, its expiry clock, display-sleep policy, cursor configuration, and socket delivery. Current changes must pass the checks selected by the owning platform and shared contracts; historical extraction PRs are not current qualification evidence.

Your change Implementation owner
Transitions, Widget visuals, Layout execution, or media surfaces Player Runtime and the relevant Widget
Pure playback defaults, item availability, or zone decisions shared by Studio and Runtime Presentation Model
Pairing, native offline selection, manifest reconciliation, command redelivery, or renderer recovery policy Player Core
CEC/DDC, NetworkManager, systemd, Linux credential files, WPE hosting, or Edge rollback Linux Edge
Android lifecycle or Keystore integration Android host
WebView2 or WKWebView, native lifecycle or distribution Windows or macOS host
Browser session, browser storage, or Companion integration Browser Player and Companion
A rule that independently implemented Players must agree on A fixture at the rule’s existing contract owner

For example, a command redelivery fix belongs in shared native behavior. A CEC adapter fix stays in Edge. A transition changes Player Runtime. A manifest field starts with the manifest schema and its consumers. The native-host readiness record preserves the extraction audit and dated qualification evidence. Use current platform documentation and CI for present release readiness.

From the repository root, run:

Terminal window
python3 scripts/ci/check-player-architecture.py

Run make player-check and make player-test to check the shared Rust crates. CI runs these crates on Ubuntu and macOS. Edge integration checks still run on Linux, including the tests selected when a shared crate changes.

The check rejects dependencies from shared Player crates back into a native host, including aliases, workspace dependencies, and target-specific dependencies. make check and CI also run it. Read the contract ownership guide before adding a fixture. Keep HTTP contracts in OpenAPI, manifest documents in the manifest schema, and presentation conformance with Player Runtime.

Move implementation under the existing tests. Keep shipped SQLite migrations unchanged, verify content before use, preserve the installation identity check, and keep renderer media authorization and signed-update rollback intact. The Edge implementation ledger links to the integration and system tests.

Android uses a Kotlin host with Rust Player Core. Windows and macOS share native composition in crates/webview-host; macOS remains in development. Browser Player shares presentation contracts but has its own session and offline model. iOS and iPadOS host Studio, not Player. The common contracts don’t establish physical qualification for any particular device.