Idea: create a GPGPU library or even standart functions for Deno.
I believe this is out of the scope for Deno... we do not need to implement every library in core, but you can make one and PR a link in registry
Not out of scope. I want to support WebGL in core. But i won't be ready to start this for many months.
@kyranet It needs native bindings, you can't use OpenCL/CUDA in JS :laughing:
I assume this would slowly lead to a native implementation of canvas
in Deno, right? I find this a very complicated task, but also one of the most interesting things 馃槃
And sorry about my previous message, I wasn't very sure of what @sh7dm meant with GPGPU 馃憤
The plan is to use Angle: https://cs.chromium.org/chromium/src/third_party/angle/BUILD.gn
following the example of https://github.com/stackgl/headless-gl
@ry it renders its output to file?
@sh7dm rendering to an image is one option. But you can also create a window with Angle, as seen in this example: https://cs.chromium.org/chromium/src/third_party/angle/samples/WindowTest/WindowTest.cpp?g=0
Although still not a standard, webgpu is also an interesting choice.
@quininer interesting
I'd love to see this happen!
I've been building a TypeScript UI framework on top of Skia (via CanvasKit) and Aurelia vNext. It's still early, but very promising (think of it as a competitor to Flutter, but heavily inspired by WPF). I had hoped, as a phase two, to look into trying to convince the Deno team to surface WebGL APIs and a mechanism to create platform windows. I think there's a compelling set of scenarios here for building cross-platform games and GUIs without HTML/CSS being involved, and with a stronger, capabilities-based security model. Sadly, I wouldn't say that I have the experience required to make this contribution to Deno myself, but I'd love to be involved in providing use cases and helping to prove out what Deno ends up supporting. I'm also happy to act as a liaison to the Skia folks, as I think having CanvasKit enabled for Deno, independent of my own work, is a very powerful enabler. I could also help coordinate with other popular libraries, such as Pixi.js and Babylon.js. My open source team has some presence in those communities and I think it's to all our benefit to collaborate and try to make this happen.
Thanks for all the awesome work that's going on here. Keep it up Deno team!
I will have a try to implement a minimal demo with https://github.com/rust-skia/rust-skia and https://github.com/pcwalton/surfman when I had time.
aside: rust-skia looks like a good candidate to use https://github.com/denoland/cargo_gn
Instead of supporting WebGL directly in core (or at least in addition to), it might make more sense to consider WebGPU. I realize it is early in the process for such things but we are already on the bleeding edge for several other things like WASM ESM, etc. and there is already wgpu, a rust implementation we might be able to bring in via cargo.
Considering WebGPU, I'm working on bindings to wgpu-rs following the WebGPU IDL interface as a Deno plugin.
@maierfelix has been made a webgpu-node implementation based on Google's Dawn working with Nodejs, and even made ray-tracing extension works!!. better integrate his excellent work
And more importantly, enabling webgpu based tensorflow.js
@mko-io I would prefer the webgpu rust implementation since deno is also written in rust.
One could also argue that Google's Dawn will work better with v8.
IMO wgpu-rs is still the better choice for deno.
I think glow would be the right way support WebGL
Most helpful comment
Not out of scope. I want to support WebGL in core. But i won't be ready to start this for many months.