Pular para o conteúdo

WebGPU

Atualizado em Ver como Markdown

The WebGPU API allows you to use the GPU directly from JavaScript.

The WebGPU API is only accessible from within Durable Objects. You cannot use the WebGPU API from within Workers.

To use the WebGPU API in local development, enable the experimental and webgpu compatibility flags in the Wrangler configuration file of your Durable Object.

compatibility_flags = ["experimental", "webgpu"]

The following subset of the WebGPU API is available from within Durable Objects:

The following subset of the WebGPU API is not yet supported:

Examples