moot
moot6mo ago

Is there a way to use a custom wgpu build with Deno?

Hi! I'm new to Deno (and Rust) and I couldn't find much about this online - sorry if this might be a basic question. I'm doing a uni project to fuzz test different WebGPU API implementations. I'm randomly generating WebGPU API calls and then passing them to a WebGPU implementation compiled with sanitizers (such as address-sanitizer), then seeing if any memory violations occur. I've done this with Google's Dawn (https://dawn.googlesource.com/dawn/+/refs/heads/chromium/4959/src/dawn/node/) and NodeJS but as I understand, Deno ships with wgpu built in. Is there any way to swap out the underlying WebGPU implementation that is called to a wgpu that has been built with sanitizers? Thanks so much!
1 Reply
Deno AI Helper
Deno AI Helper6mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on your message, I can provide some general insights. Deno does indeed come with a built-in WebGPU implementation, and it is not designed to be swapped out with a custom build out of the box. This is because Deno aims to provide a secure and stable runtime environment, and using a custom build could introduce variables that are outside of Deno's control. That being said, if you're looking to use a custom build of wgpu with sanitizers for your fuzz testing, you would likely need to modify Deno's source code to integrate your custom build. This would involve a deep understanding of Deno's internals and the build process for both Deno and wgpu. It's a non-trivial task and would require you to maintain your own fork of Deno. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. Since you're working on a university project, it might be worth reaching out to the Deno community or contributors for more detailed guidance on this matter. They might have more insights or suggestions for your specific use case.