Electrobun WebGPU

Render GPU graphics with WebGPU in Electrobun using GpuWindow and WGPUView.

366|65|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/milady-ai/milady --skill electrobun-webgpu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Electrobun WebGPU
Source: https://github.com/milady-ai/milady/tree/main/.claude/plugins/electrobun-dev/skills/electrobun-webgpu
Command: npx skills add https://github.com/milady-ai/milady --skill electrobun-webgpu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexities of using WebGPU within the Electrobun framework, enabling direct GPU rendering for high-performance applications.

Core Features & Use Cases

  • Direct GPU Rendering: Utilize GpuWindow and WGPUView for native surface rendering, bypassing webviews.
  • WebGPU Patterns: Implements essential patterns like KEEPALIVE for FFI pointer management, render loops, and WGSL shader integration.
  • Use Case: Develop a real-time data visualization tool that renders complex charts and graphs directly to a native window using GPU acceleration for maximum performance.

Quick Start

Configure your electrobun.config.ts to include bundleWGPU: true for your target platforms.

Frequently Asked Questions about Electrobun WebGPU

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use WebGPU for direct GPU rendering in Electrobun?

Use WebGPU for direct GPU rendering in Electrobun by utilizing GpuWindow and WGPUView to bypass webviews and render directly to native surfaces. You must configure your electrobun.config.ts to include bundleWGPU: true.

How do I manage FFI pointer lifetimes when developing WebGPU shaders in Electrobun?

Manage FFI pointer lifetimes during WebGPU shader development by implementing the KEEPALIVE pattern. This ensures efficient render loops and stable WGSL shader integration without premature memory deallocation or application crashes.

Why is my WebGPU application not working in Electrobun after bundling?

Your WebGPU application is likely not working due to missing WGPU bundling or improper swap chain handling. Resolve this by setting bundleWGPU: true in your electrobun.config.ts and ensuring your render loops correctly manage the swap chain.

Can I build real-time data visualization tools using WebGPU in Electrobun?

You can build real-time data visualization tools in Electrobun using WebGPU. It enables direct GPU rendering to a native window, allowing you to render complex charts and graphs with maximum hardware acceleration performance.

What is the best way to handle native surface rendering with WebGPU instead of using webviews?

The best way to handle native surface rendering with WebGPU is to use GpuWindow and WGPUView components. This approach bypasses webviews entirely, leveraging direct GPU rendering for high-performance graphical applications within the Electrobun framework.