<story><title>Is It Time to Rewrite the Operating System in Rust? [video]</title><url>https://youtube.com/watch?v=HgtRAbE1nBM</url></story><parent_chain></parent_chain><comment><author>pornel</author><text>As someone who&amp;#x27;s rewritten several things in Rust, and even written C to Rust &amp;quot;transpiler&amp;quot;, I totally agree with the approach of keeping working C code as-is, and switching to Rust for new code.&lt;p&gt;Rewrites from scratch are time consuming, and at risk of second system syndrome (especially when you suddenly have all the shiny new language features).&lt;p&gt;Direct 1:1 rewrites are underwhelming. After the initial C to Rust pass you end up with the same program, with a C-like architecture, and all you&amp;#x27;ve done is replaced gcc with a slower rustc.&lt;p&gt;But wrapping a C implementation in a Rust API works &lt;i&gt;great&lt;/i&gt;.  You can translate C&amp;#x27;s implied ownership semantics into explicit Rust types. You can wrap all these C structs&amp;#x2F;handles with their init and free functions into RAII that never leaks.&lt;p&gt;It&amp;#x27;s something you can do in days, not months to years. You keep a fully working program at all times. You benefit from Rust for new development, and you can gradually refactor C out of it when and where it&amp;#x27;s sensible to do so.</text></comment>
<story><title>Is It Time to Rewrite the Operating System in Rust? [video]</title><url>https://youtube.com/watch?v=HgtRAbE1nBM</url></story><parent_chain></parent_chain><comment><author>Redoubts</author><text>By Bryan Cantrill, which makes it totally worth it.</text></comment>