gpux 0.1.0 copy "gpux: ^0.1.0" to clipboard
gpux: ^0.1.0 copied to clipboard

Cross-platform GPU for Dart. Works on web and native.

gpux #

Cross-platform GPU for Dart. Uses WebGPU in the browser, wgpu everywhere else. The API follows the WebGPU spec so there's nothing new to learn if you've used it before.

import 'package:gpux/gpux.dart';

final gpu = Gpu();
final adapter = await gpu.requestAdapter();
final device = await adapter.requestDevice();

Downlevel capabilities #

Not every adapter supports the full spec (especially GLES fallbacks on old Android). Check before using optional features:

final controller = GpuController();
await controller.initialize();

if (controller.supportsCompute) {
  // safe to create compute pipelines
}

if (!controller.workarounds.brokenMipmapGeneration) {
  generateMipmaps(texture);
}

Blocklist #

On Android, some Vulkan drivers are broken beyond repair (old Adreno, Huawei Maleoon, pre-BXE PowerVR). gpux detects these at startup and falls back to GLES automatically.

Flutter #

For rendering to a Flutter widget, see flutter_gpux.

0
likes
150
points
200
downloads

Documentation

API reference

Publisher

verified publisherdartgfx.dev

Weekly Downloads

Cross-platform GPU for Dart. Works on web and native.

Repository (GitHub)
View/report issues

Topics

#gpu #webgpu #graphics

License

MIT (license)

Dependencies

gpuweb, gpuweb_js, meta, wgpu

More

Packages that depend on gpux