skia-rs-gpu

Crates.ioskia-rs-gpu
lib.rsskia-rs-gpu
version0.2.0
created_at2026-01-02 20:50:26.236713+00
updated_at2026-01-03 18:46:51.395963+00
descriptionGPU backends for skia-rs
homepagehttps://github.com/pegasusheavy/skia-rs
repositoryhttps://github.com/pegasusheavy/skia-rs
max_upload_size
id2019176
size353,548
Joseph R. Quinn (quinnjr)

documentation

https://docs.rs/skia-rs-gpu

README

skia-rs-gpu

GPU backends for skia-rs, a pure Rust implementation of the Skia 2D graphics library.

Features

  • wgpu backend: Cross-platform GPU rendering (default)
  • Vulkan backend: Native Vulkan support (planned)
  • OpenGL backend: OpenGL ES 2.0+ / OpenGL 3.0+ (planned)

Feature Flags

Feature Default Description
wgpu-backend wgpu cross-platform backend
vulkan Native Vulkan backend
opengl OpenGL/OpenGL ES backend

Usage

use skia_rs_gpu::{WgpuContext, WgpuSurface};

// Create a GPU context
let context = WgpuContext::new()?;

// Create a GPU-backed surface
let surface = WgpuSurface::new(&context, 800, 600)?;

// Draw on the canvas (same API as CPU)
let canvas = surface.canvas();
canvas.clear(Color::WHITE);
canvas.draw_rect(&rect, &paint);

// Present to screen
surface.present();

Status

⚠️ GPU backends are currently in development. The wgpu backend is functional for basic operations.

License

MIT OR Apache-2.0

See the main repository for more information.

Commit count: 0

cargo fmt