WebGPU

Last updated Apr 21, 2026 Caution

The WebGPU API is only available in local development. You cannot deploy Durable Objects to Cloudflare that rely on the WebGPU API. See Workers AI for information on running machine learning models on the GPUs in Cloudflare's global network.

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:

API Supported? Notes
navigator.gpu ↗︎ ✅
GPU.requestAdapter ↗︎ ✅
GPUAdapterInfo ↗︎ ✅
GPUAdapter ↗︎ ✅
GPUBindGroupLayout ↗︎ ✅
GPUBindGroup ↗︎ ✅
GPUBuffer ↗︎ ✅
GPUCommandBuffer ↗︎ ✅
GPUCommandEncoder ↗︎ ✅
GPUComputePassEncoder ↗︎ ✅
GPUComputePipeline ↗︎ ✅
GPUComputePipelineError ↗︎ ✅
GPUDevice ↗︎ ✅
GPUOutOfMemoryError ↗︎ ✅
GPUValidationError ↗︎ ✅
GPUInternalError ↗︎ ✅
GPUDeviceLostInfo ↗︎ ✅
GPUPipelineLayout ↗︎ ✅
GPUQuerySet ↗︎ ✅
GPUQueue ↗︎ ✅
GPUSampler ↗︎ ✅
GPUCompilationMessage ↗︎ ✅
GPUShaderModule ↗︎ ✅
GPUSupportedFeatures ↗︎ ✅
GPUSupportedLimits ↗︎ ✅
GPUMapMode ↗︎ ✅
GPUShaderStage ↗︎ ✅
GPUUncapturedErrorEvent ↗︎ ✅

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

API Supported? Notes
GPU.getPreferredCanvasFormat ↗︎
GPURenderBundle ↗︎
GPURenderBundleEncoder ↗︎
GPURenderPassEncoder ↗︎
GPURenderPipeline ↗︎
GPUShaderModule ↗︎
GPUTexture ↗︎
GPUTextureView ↗︎
GPUExternalTexture ↗︎

Examples

Was this helpful?

YesNo

On this page

WebGPU - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/durable-objects/api/webgpu/#page","headline":"WebGPU","description":"Use the WebGPU API for GPU access from within Durable Objects in local development.","url":"https://developers.cloudflare.com/durable-objects/api/webgpu/","inLanguage":"en","image":"https://developers.cloudflare.com/durable-objects/api/webgpu/og.png?v=18f2a9a020c33c3e","dateModified":"2026-04-21","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


title: List Durable Object Namespaces

Skip to content

API Reference

Durable Objects

Namespaces

Copy Markdown

Open in ClaudeOpen in ChatGPTOpen in Cursor


Copy MarkdownView as Markdown