Date: Sun, 08 Sep 2024 09:44:16 +0200 From: Kristof Provost <kp@FreeBSD.org> To: David Chisnall <theraven@freebsd.org> Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Alan Somers <asomers@freebsd.org>, Dmitry Salychev <dsl@freebsd.org>, Jan Knepper <jan@digitaldaemon.com>, freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in any system) Message-ID: <B355DB3E-82A2-407A-9D70-2A40C953DEB2@FreeBSD.org> In-Reply-To: <4E4FB8CC-A974-42C4-95D5-2E1E4BF681AD@freebsd.org> References: <202409060725.4867P3ul040678@critter.freebsd.dk> <4E4FB8CC-A974-42C4-95D5-2E1E4BF681AD@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 6 Sep 2024, at 9:41, David Chisnall wrote: > The strategy document that I coauthored at Microsoft recommended the > following: > > - C++ conforming to the Core Guidelines and with static analysis for > existing C/C++ projects with the C parts incrementally migrated to > C++. While I’d be interested in seeing Rust demonstrated there are clearly still some practical issues to work out before we can, even in user space. So, at the risk of derailing the Rust conversation, I want to ask about C++. We already ship user space C++ code, what’s stopping us from doing so for kernel code? If we can get some of the benefit of a more modern language with much less effort would that be a worthwhile step? RAII would not *always* make reasoning about locks easier, but it would in at least 95% of cases. What would we need to do to be able to use C++ in the kernel? Best regards, Kristof [-- Attachment #2 --] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"> </head> <body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;"> <p dir="auto">On 6 Sep 2024, at 9:41, David Chisnall wrote:</p> </div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #136BCE; color: #136BCE;"><p dir="auto">The strategy document that I coauthored at Microsoft recommended the following:</p> <p dir="auto"> - C++ conforming to the Core Guidelines and with static analysis for existing C/C++ projects with the C parts incrementally migrated to C++.</p> </blockquote></div> <div class="markdown" style="white-space: normal;"> <p dir="auto">While I’d be interested in seeing Rust demonstrated there are clearly still some practical issues to work out before we can, even in user space.</p> <p dir="auto">So, at the risk of derailing the Rust conversation, I want to ask about C++.</p> <p dir="auto">We already ship user space C++ code, what’s stopping us from doing so for kernel code?<br> If we can get some of the benefit of a more modern language with much less effort would that be a worthwhile step? RAII would not <em>always</em> make reasoning about locks easier, but it would in at least 95% of cases.</p> <p dir="auto">What would we need to do to be able to use C++ in the kernel?</p> <p dir="auto">Best regards,<br> Kristof</p> </div> </div> </body> </html>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B355DB3E-82A2-407A-9D70-2A40C953DEB2>
