Published in News

Torvalds contemplates Rust

by on26 March 2021


Well he is getting old

IT's Mr Sweary Linus Torvalds says he is that while he is not pushing for Rust, he is open to it.

Torvalds told ZDNet that  considering the promised advantages and avoiding some safety pitfalls, Rust does seem to have promise "…but I also know that sometimes promises don't pan out", Torvalds said.

Torvalds thinks, Rust's primary first target seems to be drivers, simply because that's where you find just a lot of different possible targets, and you have these individual parts of the kernel that are relatively small and independent.

"That may not be an exciting target for some people, but it's the obvious one." Another point is taking on drivers first for "any initial trials to drivers is simply the architecture side", said Torvalds.

"Lots of drivers are only relevant on a couple of target architectures, so the whole issue with Rust code not being supported on some architectures is less of an issue." Kroah-Hartman agrees that "drivers are probably the first place for an attempt like this as they are the 'end leafs' of the tree of dependencies in the kernel source. They depend on core kernel functionality, but nothing depends on them."

Torvalds knows some people don't like the idea of Rust in userspace at all.

 "People complain[ing] about "Rustification" in userspace isn't a great sign for any future kernel use, but hey, we'll see. The kernel is different from userspace projects -- more difficult in some respects (we use a lot of very odd header files that pushes the boundary of what can be called "C"), but easier in many other respects (mainly in the sense that the kernel is fairly self-contained, and then doesn't rely on other projects for the final binary)."

Last modified on 26 March 2021
Rate this item
(4 votes)

Read more about: