3 ms·
> Metal Shaders Write a wrapper, it's easy in Rust. Follow this example https://github.com/gfx-rs/metal-rs https://github.com/gfx-rs/metal-rs > CUDA There's a
by adamnemecek 7y ago
> Metal Shaders
Write a wrapper, it's easy in Rust.
Follow this example https://github.com/gfx-rs/metal-rs https://github.com/gfx-rs/metal-rs
> CUDA
There's a wrapper.
https://docs.rs/cuda/0.1.0/cuda/ https://docs.rs/cuda/0.1.0/cuda/
> DriverKit
There's a wrapper https://github.com/dcuddeback/iokit-sys https://github.com/dcuddeback/iokit-sys.
> Gtk-rs
GTK is terrible, Gtk-rs is putting a lipstick on a pig. I need 2D rendering but also power to touch the gpu to write a shader, to use gl_VertexID when I feel like it.
The thing about rust is that that I can legit write my own bindings for any lib written in c/c++, anything else.
Like you go from zero to dependency included, building in less than 10sec. The build process is insane.
Check out this port of nanovg https://github.com/sunli829/nvg https://github.com/sunli829/nvg. NanoVG is a popular project with many contributors, this port is a single person project that's better in many ways.
With rust you literally just do
"git clone https://github.com/sunli829/nvg" https://github.com/sunli829/nvg"
"cd nvg/nvg-gl"
"cargo run -p nvg-gl --example demo-cutout"
You go from git clone to drawing something interesting to screen in 10 seconds of human time (there might be some time spent building dependencies but whatever, I don't need to touch anything).
- pjmlp 7y agoAll those projects are toy examples, barely with any usable code on them. As for compile speeds, I very much doubt it takes 10 seconds, given the current state of being forced to compile the world from scratch without any support for binary libraries and the continuous posts regarding compiler slowness. If I want to draw a SVG, I just drop it into my application, no need to compile anything. https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.imaging.svgimagesource https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.med...