News for hackers. Stuff that matters.
Re:Point of WebGPU on Native by saurik on Wednesday May 06, 2020 @06:20AM (#23089435)
Is there an easy way to get Dawn or wgpu attached to v8 or SpiderMonkey without having to involve the entire rest of a web browser? I see there are a number of language bindings for wgpu in the wgpu-native repository, but surprisingly not JavaScript. I found commits placing it in servo, but I don't see why the vast majority of the API surface should be reliant on a browser :(. As an analogy, I can use OpenGL without a GUI toolkit, and the only parts that are really connected to the GUI toolkit are a handful of presentation functions at the very top: the headers and libraries for OpenGL are abstract/common no matter what toolkit you are using. I want to use WebGPU in all the same contexts I use OpenGL: to do accelerated rendering operations, not merely to display graphics. I would thereby expect that I would have bindings for WebGL/WebGPU (with all of its safety/security transformations) at a lower level that can target a JavaScript engine API and then I can build whatever GUI I wanted at a higher layer. Where is the impedance mismatch in what I am thinking vs. how this always seems to be implemented?
Re:Point of WebGPU on Native by kangz on Wednesday May 06, 2020 @08:58AM (#23090379)
Browsers are Javascript bindings to WebGPU :) But more seriously, there is a https://github.com/maierfelix/webgpu that implements node bindings for Felix's Dawn fork. The fork is close to upstream and Dawn is close to "webgpu.h" so it should be easy to repurpose.