Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
no-panic
Discontinued Attribute macro to require that the compiler prove a function can't ever panic
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
While I'd also not really like that it's made easier by binding-generators (rust-bindgen for example generates bindings to C (and to some extent C++)). You'll most likely still wanna wrap the generated code into an idiomatic rust API but at least the super painful work can be automated.
I wouldn't necessarily call it dragging in technical debt but that's probably a difference in philosophy: to me it's a standardized solution and it's great that we can just pull it in from crates.io. I don't have a problem with a project having maybe hundreds of dependencies because of the strong guarantees that crates provide. I definitely prefer it to C++ projects that include the same hand-rolled functionality in multiple incompatible ways.
You absolutely can do "pure Rust" systems level programming; see for example the list at https://github.com/flosse/rust-os-comparison. But lets be real most people - even if we restrict ourselves to system programming - don't deal with code from that domain anyway. People don't learn to program by writing their own OSs, drivers or whatever.
For your libdrm example someone apparently already worked on "pure rust" implementation a few years ago https://github.com/pszpetkowski/rust-drm - but I haven't looked into the internals so I really can't speak to the how.
nope. Unfortunately, no mainstream language has this yet. We need an Algebraic effects typesystem to do this properly. There are a few temporary band-aid solutions like https://github.com/dtolnay/no-panic
(eg. It's the first listed option for Whipper, which is the closest open-source alternative to Exact Audio Copy and a Python project with a ton of C dependencies... and I say this as someone who dislikes Docker enough that I still went through the hassle of the "Building" section.)
Otherwise, C would never have achieved success in MS-DOS when all the stuff it was binding to at the time required blocks of inline assembly. (Crates like rust-cpp do exist, which allow "inline C++" in the same way that C++ allows inline assembly.)
Thankfully, most people don't statically link SDL 1.2, so it's possible to use sdl12compat to rebase them on top of SDL 2.x's non-modesetting fullscreening support, among other things.
Well, the Rust people are working toward a spec, and there's also the Ferrocene Language Specification effort for making a verified compiler, so I'm willing to give them the benefit of the doubt that doing so is attainable and, given what I've seen of the Rust team in all my time lurking in and occasionally commenting on RFCs, I trust that they won't engage in politicking BS.