cuda-wasm (v1.1.1) is a high-performance transpiler that converts CUDA C++ code to WebAssembly and WebGPU, enabling GPU-accelerated computing in browsers and Node.js without NVIDIA hardware. It uses a clean-room implementation based on public CUDA specifications, translating CUDA syntax to Rust/WebGPU patterns. Ships with TypeScript types, supports Node >=16.0.0. Key differentiators: no NVIDIA dependencies, near-native performance via WebGPU, ruv-FANN neural network integration. Released under MIT/Apache-2.0. Active development.
npm install cuda-wasmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a CUDA kernel and run it on WebGPU, demonstrating vector addition.
Use transpileCUDA and runKernel for kernels; do not expect CUDA runtime functions.
Consult the documentation for supported features; avoid dynamic parallelism and PTX.
Serve your app over HTTPS or use localhost; do not open HTML directly from filesystem.
Use cuda-wasm directly; no need for additional packages.
Use a browser with WebGPU enabled (Chrome 113+, Edge 113+, Firefox Nightly).
Rewrite kernel to avoid runtime API; allocate memory outside and pass as args.
No dependency data recorded yet.