Our great sponsors
-
-
In real world software, 99% of code is gluing preexisting lower-level functions together. In C/C++, the unsafe is implicit and needlessly covers everything. In Rust, the unsafe is only needed for the 1%.
You can safely implement a doubly-linked list in Rust, using unsafe, and that list can offer a safe interface so that the next higher level of code does not need to use unsafe. In fact, one doubly-linked list implementation that provides a safe interface is in the Rust standard library: https://doc.rust-lang.org/std/collections/struct.LinkedList.... . Most people do not rewrite std::list in C++ either.
Much of the Linux kernel really is the same: normal C code (maybe slightly more complicate than average userspace code, and definitely more carefully reviewed, but definitely not magic), that depends on extra carefully written lower level primitives that are _much_ more complicated internally than they appear from the outside (like the memory allocator, printk, RCU, etc.).
Rust is powerful enough to have libraries for register level access to micro-controllers (e.g. https://github.com/stm32-rs/stm32-rs), that encode moderately complex access rules safely in the type system (e.g. which specific set of bits is read-only or write-only, with which particular values (with nice human-readable names, even!), in which particular states of a state machine depending on other bits), all while allowing bypassing the restrictions with a simple unsafe keyword without even giving up on the nice API.
On the C/C++ side, I've used libopencm3, MBED, CMSIS, and everyone's favorite toy, Arduino. They're, in different ways, all much more mature and complete than anything Rust has today, but nothing comes even remotely close to Rust in terms of safety and long term potential.
-
SonarQube
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
-
I don't want to list specific contributors here. We often have no information on why people left the project - there might be all sorts of personal factors. I will say that my broader sentiment - that Rust's momentum has slowed, that it's not delivering on its commitments in a timely way, that there are concerns about it's ability to deliver in future - has been expressed publicly by high profile past core contributors:
https://github.com/rust-lang/rust/pull/96709#issuecomment-11...
I don't think Rust should tackle any ambitious project to rewrite the compiler while these basic concerns remain.
-
-
> It defaulted to the fully backwards compatible version (vs 2021)
Cargo defaults to the 2021 edition, and has ever since it was stabilized: https://github.com/rust-lang/cargo/pull/9800
Either you accidentally installed a version of cargo from before the 2021 edition was stabilized, or you ran "cargo new --edition ", or you started by cloning an out of date project of some sort, in which case it's not really an issue with "defaults".
-
https://www.pingcap.com/blog/rust-compilation-model-calamity... is a good overview. In general it varies depending on the crate but we track the performance at https://perf.rust-lang.org/ - if you look at cargo, for example, over 60% of the time is spent in codegen through LLVM: https://perf.rust-lang.org/detailed-query.html?commit=222d1f...