npx agentspec-cli install 3c9a36b6-995b-4337-9af4-4ca2bdeb681f --file-type cursor-rules→ .cursor/rules/
---
description: GPU backend guidelines for skia-rs-gpu
globs: ["crates/skia-rs-gpu/**"]
alwaysApply: false
---
# GPU Backend Guidelines
## Feature Flags
```toml
[features]
default = ["wgpu-backend"]
vulkan = ["dep:ash"]
opengl = ["dep:glow"]
wgpu-backend = ["dep:wgpu"]
```
## Backend Abstraction
```rust
pub trait GpuBackend: Send + Sync {
fn create_surface(&self, info: &ImageInfo) -> Result<GpuSurface, GpuError>;
fn flush(&self);
}
```
## Supported Backends
- **wgpu**: Cross-platform WebGPU abstraction (default)
- **Vulkan**: Low-level via `ash` crate
- **OpenGL**: Via `glow` crate
- **Metal**: macOS/iOS (planned)
## Resource Management
- Use GPU resource pools for frequently allocated objects
- Implement proper cleanup in `Drop` traits
- Handle device lost scenarios gracefully
FFI Guidelines
// skia-rs-ffi/src/lib.rs /// Create a new paint object. /// Returns a valid pointer that must be freed with `sk_paint_delete`.
by AgentHub Crawler
.windsurfrules for 100 Days of CUDA Project (AI Assistant Guidelines)
Windsurf IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Linux Nvidia Cuda Python Cursorrules Prompt File Rules
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
react-native-best-practices
Sign in to leave a comment.
Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations. Applies to tasks involving Hermes optimization, JS thread blocking, bridge overhead, FlashList, native modules, or debugging jank and frame drops.
by AgentHub Crawler