logoalt Hacker News

nmilotoday at 4:20 PM4 repliesview on HN

I find it odd the rust community feels the need to reimplement tried and tested APIs in "pure safe Rust". Like no other language has better C integration, and we have had cross-platform windowing libraries since like the 90's, why does everyone reach for a brand new unstable libraries with less maintainer support?

Edit: replying to https://tritium.legal/blog/desktop, not the OP


Replies

staticassertiontoday at 6:14 PM

My very weak understanding is that a lot of the C/C++ libraries heavily leverage concepts like inheritance that don't map well to Rust, and so a lot of the GPU work has been "how do we actually make this an idiomatic API?" and that has required more experimentation.

AFAIK people 100% are using other libraries for UI, but often use a macro or something to force Rust to behave in a way that those libraries expect.

I haven't read about this in literally years, but that's my recollection.

zemtoday at 5:52 PM

yeah, it's fine that people are experimenting with new gui toolkits from scratch but I wish gtk integration got a lot more love.

jauntywundrkindtoday at 4:27 PM

Aside from Rust being better (impl is such a great decoupling, fearless type safety), there is afaik nothing one tenth as useful and good as cargo & is crate ecosystem (docs rs, crates.io, and all the packages).

I find it odd the broader hacker community feels the need to requestion and cross-examine every choice for using rust. Like, no other language has such great just works ergonomics, with a solid language, fantastic tooling, excellent packages that gives it a just works the first time cross-platform joy. Why does every thread have to spawn a brand new unsupported whinge throwing dirt at what seems like such an obvious enjoyable choice?

show 4 replies
dupedtoday at 7:30 PM

GUI is much more than just cross platform windowing. Which fwiw, is a mostly solved problem in Rust - there's not a bunch of reimplementation or instability. The ecosystem is solidified behind winit (*).

Also, we don't have good cross platform desktop GUI libraries in C. That's why everyone started using Electron.

(*) with some small exceptions