⚡
Lightning Fast
Built with Rust and wgpu. 50x smaller binary (1.7MB vs 50-150MB), 18x faster build times.
Modern, lightweight alternative to Dawn. Built with Rust + wgpu.
npm install @sylphx/webgpubun add @sylphx/webgpupnpm add @sylphx/webgpuconst { Gpu } = require('@sylphx/webgpu')
async function main() {
// Create GPU instance
const gpu = Gpu.create()
// Request adapter
const adapter = await gpu.requestAdapter()
console.log('GPU:', adapter.getInfo().name)
// Request device
const device = await adapter.requestDevice()
// Ready to use WebGPU!
console.log('WebGPU ready!')
}
main()Run with:
# Node.js
node example.js
# Bun (2x faster startup!)
bun example.js| Feature | @sylphx/webgpu | @kmamal/gpu (Dawn) |
|---|---|---|
| Build Time | 5-15 minutes | 1-3 hours |
| Binary Size | ~1.7MB | 50-150MB |
| Dependencies | Cargo only | depot_tools (1GB) + Dawn (8GB) |
| Implementation | wgpu (Rust) | Dawn (C++) |
| Platform Support | 18+ via napi-rs | Limited prebuilts |
Latest Updates
Binary Size: 1.7 MB (50x smaller than Dawn)
Build Time: 12s (18x faster than Dawn)
Startup (Bun): 0.15s (2.3x faster than Node.js)
Tests: 37 pass (16,538 assertions)