gpux

Cross-platform GPU access for Dart — WebGPU on web, wgpu on native.

This package is under active development. The initial release is coming soon.

Plan

gpux provides a single entry point for GPU access that works on every platform. It implements the gpuweb interfaces and automatically selects the right backend:

  • Web: gpuweb_js (browser WebGPU via dart:js_interop)
  • Native: wgpu (wgpu-native via Dart FFI)

Write GPU code once, run it everywhere.

Stack

┌─────────────────────────────────────────┐
│  flutter_gpux    Flutter GPU widget     │
├─────────────────────────────────────────┤
│  gpux            Cross-platform facade  │
├──────────────┬──────────────────────────┤
│  gpuweb_js   │  wgpu                    │
│  (web)       │  (native)               │
├──────────────┴──────────────────────────┤
│  gpuweb          Shared interfaces      │
└─────────────────────────────────────────┘
Package Description
gpuweb Platform-agnostic WebGPU interfaces
gpuweb_js Web backend via dart:js_interop
wgpu Native backend via wgpu FFI
naga WGSL validation and shader compilation
flutter_gpux Flutter widget for cross-platform GPU rendering
flutter_webgpu Flutter widget for web GPU rendering

Libraries

gpux
Cross-platform GPU access for Dart.