•   
  •   
  •   

Technology Let the Linux kernel Rust

19:37  21 july  2021
19:37  21 july  2021 Source:   techrepublic.com

Microsoft makes support for Linux GUI apps on Windows 10 coming later this year

  Microsoft makes support for Linux GUI apps on Windows 10 coming later this year Microsoft's Build 2021 event doesn't have a whole lot of Windows-specific news, but there are some tidbits of potential interest to Windows developers, especially those wanting to run Linux apps on Windows.There isn't a whole lot of Windows-focused development news at Build this week, but that may be by design. Microsoft is rumored to be planning a dedicated Windows event later this summer (and possibly next month) where it will talk about what's next for Windows. Microsoft is expected to begin detailing the changes it is making in Windows with its Sun Valley UX refresh at that event.

Rust has been threatening to creep into Linux in various ways for some time now. We're talking Rust, the programming language, not rust the iron oxide. And the creeping shows zero signs of slowing. In fact, Rust has finally (and officially) found its way into the Linux kernel.

a painting of a graffiti covered wall: Image: YouTube © Provided by TechRepublic Image: YouTube

And that's a good thing.

SEE: 5 Linux server distributions you should be using (TechRepublic Premium)

More about open source

  • Microsoft Linux is not what you thought (or hoped) it would be
  • What the Linux Mint developers have pulled off is nothing short of astounding
  • Linux: The 7 best distributions for new users (free PDF)
  • Top commands Linux admins need to know (TechRepublic Premium)
a painting of a graffiti covered wall: Image: YouTube © Image: YouTube Image: YouTube

According to the Google Security Blog, the company declared (back in April) that Android now supported Rust programming language for developing the OS and they (Google) were participating in the effort to evaluate the use of Rust as a supported programming language for the Linux kernel.

Firefox 89: Mozilla brought its open source browser back from the ashes

  Firefox 89: Mozilla brought its open source browser back from the ashes Mozilla's Firefox 89 is a return to form for the open source browser. Find out what about this latest iteration helped it to return as Jack Wallen's browser of choice.I'm not going to lie: on Linux, I've been using the Opera Browser as my default for some time—even though the browser brings along with it a few frustrations. For the past few months, when working with a document in Google Docs, it would randomly devour system resources, thereby bringing the browser (and the desktop) to a screeching halt. Also, media displayed on some social media sites refused to play without a fix.

Since its inception, C has been the programming language for writing operating system kernels. Why? Because the language offers a certain level of control and predictability that other languages cannot match. And in the Linux kernel, memory issues have been quite low, due to the impeccable quality of the code. However, memory safety issues still occur. And given how many enterprise businesses now depend on Linux, even a single memory safety issue is one too many.

That's where Rust comes in. Google has been all-in on this programming language because it can help reduce the number of bugs and security vulnerabilities. The goal, of course, is not to convert the entire kernel from C to Rust, but to allow newly submitted code to be written in the newly included language.

Linux 101: Why file and directory names lack spaces

  Linux 101: Why file and directory names lack spaces Jack Wallen explains why spaces in files and folder names aren't always the best option in Linux.I cannot tell you how many times I get asked by collaborators, colleagues, friends and family, "Why do you never put spaces in file and folder names?" The answer to that question is generally met with either blank stares or cries of "What?" Way back when, in the mid-1990s, when I was still using Windows, spaces in file and folder names were commonplace for me.

But don't get your hopes up that you'll see the Rust programming language in the stable kernel any time soon. The Linux kernel has more than 30 million lines of code. However, to that end, Google is now bankrolling the Internet Security Research Group (the parent company of Let's Encrypt) to sponsor the Rust for Linux organization and is paying Miguel Ojeda as a full-time developer (with a one-year contract) to help make this happen.

SEE: C++ programming language: How it became the foundation for everything, and what's next (free PDF) (TechRepublic)

The immediate goal is to write new Linux kernel components (such as drivers) in Rust and even (possibly) rewriting some of the riskier C code.

But why Rust?

One of the biggest reasons is that Rust will not allow a developer to create the potential for buffer overflows, thereby closing some of the various avenues hackers would normally take to break into a system.

elementary OS 6 beta promises great things in the same beautiful package

  elementary OS 6 beta promises great things in the same beautiful package Jack Wallen takes a look at the beta release of elementary OS 6 and finds himself breathing a sigh of relief that the developers haven't "fixed" what isn't broken.The default elementary OS 6 beta desktop looks immediately familiar.

On this project, Josh Aas, ISRG's executive director, said, "When we think about what code is most critical for today's internet, the Linux kernel is at the top of the list. Bringing memory safety to the Linux kernel is a big job, but the Rust for Linux project is making great progress."

What is Rust?

Rust is a programming language that was designed, from the ground up, for performance and safety. Syntactically, the Rust programming language is similar to C++ and guarantees memory safety (without the help of garbage collection) by using a borrow checker (a way to force developers to manage ownership) to validate references. Rust was created by Graydon Hoare at Mozilla and has been voted "most loved programming language" every year (since 2016) in the Stack Overflow developer survey.

What does Linus think?

On July 10, 2020, Linus made his opinion clear when he said:

"No, please make it a 'is rust available' automatic config option. The exact same way we already do the compiler versions and check for various availability of compiler flags at config time."

His goal was to ensure there was widespread testing. And although Torvalds wanted the Rust programming language to be enabled by default, he did not want to not make Rust a requirement in the kernel, but rather, make sure the Rust compiler was detected on the system.

Nasty Linux systemd root level security bug revealed and patched

  Nasty Linux systemd root level security bug revealed and patched This obnoxious Linux systemd bug has been fixed, which means if you're running most recent Linux distributions, you'll need to patch it now.Can you say, "Ow!"? 

Fast forward to 2021 it was made public (during the Linux Plumbers Conference) that both Linus and other core maintainers of the kernel had expressed an openness in principle to supporting kernel development in Rust. But it's going to take considerable time if this is going to happen. Torvalds' take is as simple as it is logical. He fully understands how many people (and businesses) depend on the Linux kernel and that the days of kernel developers doing "wild and crazy things" are over. Everything has to be carefully and meticulously planned.

SEE: The best programming languages to learn--and the worst (TechRepublic Premium)

If I had to make a prediction, I'd say the future is fairly clear. What we'll see is a handful of drivers (specifically those required by big industry and enterprise businesses, such as a GPU driver for container deployment) written in Rust programming language and accepted into the kernel. Once those have proven their merit, and the dust has settled from that inclusion, Rust will continue to creep further into the kernel until it shares a marked piece of the pie with C. Will it ever completely replace C? Not in my lifetime. C is just too powerful and efficient a programming language (plus... 30 million lines of C). But where security is of key importance, Rust might well overtake the default language in those particular areas.

EndeavourOS almost makes Arch Linux a viable desktop for the average user

  EndeavourOS almost makes Arch Linux a viable desktop for the average user Jack Wallen explores the Arch-based EndeavourOS and finds it something special—for a certain user type.Although, I do try to find a happy medium in there somewhere.

It will, however, take considerable time. But that's how rust works... slowly, methodically.

Subscribe to TechRepublic's How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

Also see

  • Linux 101: How to execute commands from within the nano text editor (TechRepublic)
  • Linux 5.14 kernel: New and exciting features coming to the release (TechRepublic)
  • How to become a developer: A cheat sheet (TechRepublic)
  • Kubernetes: A cheat sheet (free PDF)(TechRepublic)
  • Could Microsoft be en route to dumping Windows in favor of Linux? (TechRepublic)
  • A guide to The Open Source Index and GitHub projects checklist (TechRepublic Premium)
  • How open source-software transformed the business world (ZDNet)
  • Linux, Android, and more open source tech coverage (TechRepublic on Flipboard)

CentOS replacement Rocky Linux 8.4 arrives, and proves instantly popular .
Rocky Linux 8.4 is the first general availability release of the new enterprise Linux distribution.Young bearded male programmer sitting in front of computer monitor in dark, working on project in software development company

usr: 1
This is interesting!