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.
-
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.
Well, from the example, I see exactly two unsafe blocks, both quite small. Something like 5 lines out of 175 are unsafe. Looking around the other samples, there's multiple files with no unsafe at all, and I have yet to see one where they just gave up and made a significant chunk of the file unsafe.
The one on the bottom left is mrustc, a compiler which is specifically designed to bootstrap the actual rustc with minimal optimization; it is not general-purpose. The one on the bottom right is rustc_codegen_gcc, an experimental backend that allows rustc to use GCC instead of LLVM; it is nowhere near ready for production right now. The only relevant compilers here are rustc and gccrs, the latter of which is also nowhere near ready for production.
The one on the bottom left is mrustc, a compiler which is specifically designed to bootstrap the actual rustc with minimal optimization; it is not general-purpose. The one on the bottom right is rustc_codegen_gcc, an experimental backend that allows rustc to use GCC instead of LLVM; it is nowhere near ready for production right now. The only relevant compilers here are rustc and gccrs, the latter of which is also nowhere near ready for production.
The one on the bottom left is mrustc, a compiler which is specifically designed to bootstrap the actual rustc with minimal optimization; it is not general-purpose. The one on the bottom right is rustc_codegen_gcc, an experimental backend that allows rustc to use GCC instead of LLVM; it is nowhere near ready for production right now. The only relevant compilers here are rustc and gccrs, the latter of which is also nowhere near ready for production.
Rustlings if you want exercises
Tour of Rust if you want quick interactive examples
Rust by example if you want more examples
The official book if you want explanations
I write C++ and raw Win32 for more than 20 years. I'm the author of this, and I'm rewriting my personal stuff in Rust just for fun.
I write C++ and raw Win32 for more than 20 years. I'm the author of this, and I'm rewriting my personal stuff in Rust just for fun.
But to bring some data, check out the fuzz trophy case. It shows that failures in Rust are most often assertions/panics (equivalent to C++ exception) with memory corruption being relatively rare (it's not never—Rust isn't promising magic—but it's a significant change).