Skip to content

RFC: Runtime-aware App executables #550

Description

@replghost

Source RFC: #507 · docs/rfcs/runtime-aware-app-executables.md · @replghost
Core implementation: #540

Problem

Hosts need to execute content-addressed App products through runtimes other than the implicit web index.html runtime defined by App manifest v1. Implementing the PolkaVM runtime, hostcalls, graphics transports, and native bindings independently in each Host would create incompatible manifest, bounds, and ABI behavior.

Goal

Define a runtime-aware App manifest and provide one host-neutral PolkaVM implementation that browser and native Hosts can consume from the same reviewed source.

Web remains the mandatory App runtime. PolkaVM is optional and remains an App runtime rather than becoming a new modality or executable kind.

Requirements

  • App manifest v1 remains valid and implies a web runtime with index.html as its entrypoint.
  • App manifest v2 declares exactly one explicit web or polkavm runtime.
  • A PolkaVM App declares its application ABI and a graphics profile.
  • Device input and audio may be declared as separately versioned runtime capabilities.
  • Unsupported runtime requirements affect only the App executable.
  • Hosts do not silently substitute another runtime or graphics profile.
  • The App subname's contenthash remains the executable identity and update signal.
  • Detailed graphics, device-input, audio, and packaging contracts are specified separately from the manifest RFC.

Initial graphics profiles

  • framebuffer
  • tri2d
  • webgpu-raster

The profiles describe application-visible Host contracts rather than a particular platform graphics backend.

Core implementation scope

  • Host-neutral PolkaVM App runtime and GPU wire crates.
  • Bounded program, memory, asset, hostcall, input, audio, save, log, Tri2D, and WebGPU resources.
  • Framebuffer, Tri2D, and WebGPU Raster presentation without profile substitution.
  • Cooperative and CoreVM guest execution.
  • Browser compiler backend with guarded interpreter fallback.
  • Swift and Kotlin access through the existing UniFFI Host artifact.
  • Source-built @parity/pvm-browser-runtime package.
  • Pinned PolkaVM native and browser translator revisions.

Implementation references

Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions