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.
  • Audio may be declared as a separately versioned runtime capability; baseline input is part of the application ABI.
  • User file input is runtime-authorized; the manifest carries only an advisory fileTypes hint.
  • 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 in paritytech/polkavm-host-runtime.
  • 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.
  • Optional native composition through truapi-polkavm-host; the base truapi artifact remains PolkaVM-free. Native runtime bindings belong to the standalone runtime distribution.
  • Source-built @parity/polkavm-browser-runtime package, consumed directly from the standalone runtime distribution.
  • Pinned PolkaVM native and browser translator revisions.

Implementation references

Tasks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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