news.volyx.in

Microsoft exec says Windows 11 kernel will soon be booting with Rust inside (neowin.net)

407 points by itvision · 1220 days ago · 222 comments on HN

Article summary

Microsoft is rewriting core Windows library code in memory-safe Rust. The company is focusing on killing bug classes with memory-safe languages, CPU architectural changes, and safer language subsets. The use of Rust in Windows is expected to improve security and performance. The discussion around the article reveals the challenges and trade-offs of using Rust in systems programming.

Main themes

  • Rust in systems programming
  • memory safety
  • out-of-memory errors
  • custom allocators
  • performance improvements
  • language design trade-offs
  • systems programming challenges

What commenters say

  • Rust's original design prioritizes aborting on out-of-memory errors, which may not be suitable for systems programming.
  • Using custom allocators can help mitigate out-of-memory issues, but it may not be a viable solution for all use cases.
  • The lack of support for custom allocators in Rust's standard library is a significant limitation for systems programming.
  • Rewriting code in Rust can lead to performance improvements, but it is unclear whether this is due to the language itself or the rewriting process.
  • Disabling overcommit on Linux systems can help prevent out-of-memory errors, but it may have unintended consequences.
  • Rust's focus on reliability and predictability makes it a good fit for critical applications, but its handling of out-of-memory errors is a concern.
  • The use of fallible allocation in Rust for Linux provides a model for how Rust can be used in systems programming.
  • The trade-offs between using Rust and other languages, such as C++, depend on the specific use case and requirements.