4 ms·
My main worry with WebGPU is the dependence with Javascript. If I understand it correctly, you can't use web APIs nor stuff like WebGPU directly through web ass
by slx26 5y ago
My main worry with WebGPU is the dependence with Javascript. If I understand it correctly, you can't use web APIs nor stuff like WebGPU directly through web assembly anyway, so there's always a javascript glue layer involved.
Now, I know some languages like Rust have decent bindings that hide all that, but I wonder about the performance cost of that glue. Has someone measured it, or estimated how better we could go without it? Or am I completely wrong about this? Or are there clear plans to make this better/disappear? (Though in my brief research I didn't find anything like it).
- hunterb123 5y agohttps://github.com/WebAssembly/WASI/issues/53 https://github.com/WebAssembly/WASI/issues/53
- modeless 5y agoWebGPU is a less chatty API than WebGL. You can kick off a huge amount of GPU computation with just a couple of function calls. The overhead of the function calls themselves is usually not a big issue. That said, I know there has been work in Chrome to make these calls more efficient for WebGL and I think the overhead is actually small.
- wrnr 5y agoThe same WebGPU API can be used as a cross platform layer to do graphics, no js needed. For example rust's wgpu can just be used without a browser.