Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by zozbot234 on Saturday June 13, 2020 @02:26PM
(#23511484)
You would also need to comprehensively annotate the Linux C headers in order to provide the information that Rust expects (e.g. for each ptr instance whether it's a "raw" pointer, a shared/exclusive reference or a piece of "owned" data, whether it can be NULL etc. etc.). This might actually get accepted upstream though. Having the kernel-build itself depend on Rust could be far more problematic, given e.g. the variety of hardware that Linux must support.
[ Parent
| on HN ]
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by ufmace on Saturday June 13, 2020 @04:36PM
(#23512467)
I would think such a thing would be more like "compiling" rust to C. As in the C code would have no means to maintain most of the safety guarantees, rather they would be verified at compile time, and the produced C would be meant to be used unchanged. So as long as nobody ever edits the C manually, it would still presumably be safe.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by phkahler on Saturday June 13, 2020 @06:11PM
(#23513254)
That's what I really meant. Write it in Rust but then output C instead of ASM. The parent is right though. A component/driver would need to use the C headers from the Rust side.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by TheDesolate0 on Saturday June 13, 2020 @02:37PM
(#23511579)
Not only that, but Rust depends on LLVM.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by dijit on Saturday June 13, 2020 @03:18PM
(#23511908)
Last time I looked at this comment it was flagged [dead]; I'm glad someone was able to remedy that as I was unable to upvote.
I think this is a good criticism, but might not be true forever and is certainly something to keep in mind.
As I said in the GP, Rust will not be upstreamed into the kernel- this is one of the reasons why.
Re:Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe S...
by kbenson on Saturday June 13, 2020 @04:50PM
(#23512592)
If a comment is dead that you think is worthwhile, you can follow the permalink to it and vouch for it. I imagine that feature is gated behind some point threshold, but my guess is whatever that threshold is you're past it.