Unable to load image

Torvalds confirms Rust :marseytrans2: is coming to the new version of Linux :marseypenguin:

https://www.techradar.com/news/torvalds-confirms-rust-is-coming-to-the-new-version-of-linux

Sorry chuds but Rust is the future of programming and there is nothing you can do about it.

r/rust thread

Generated by TLDR This:

Audio player loading… Linux creator Linus Torvalds has reportedly committed to bringing Rust to the operating system.

This time, Torvalds’ commitment seems to be greater, however he does stress that it will "just have the core infrastructure (i.e. no serious use case yet)”.

Linux 6.0 is the project’s current offering, which has been available for testing since August 2022, however details of the next release are already being uncovered, including the ability for the OS to tell you if your CPU is faulty.

According to a CircleCI report on the most popular coding languages, Rust just made it into 25th place in 2021 after dropping out of the top 25 in the year prior.

Even so, Rust is favored for its strong performance, and is supported by Google for developing its Android OS (which itself is a hugely popular Linux distro).

In a post on Google’s Security Blog (opens in new tab) back in April 2021, Android team member Wedson Almeida Filho said that Rust was ready to join C “as a practical language for implementing the kernel.”

32
Jump in the discussion.

No email address required.

I’ve been debating learning rust for fun but I’m not sure if I want to go back after using python. Any rustcels here tell me about some advantages over other languages?

Jump in the discussion.

No email address required.

Rust's main draw seems to be performance, memory safety and a strict compiler which makes it appealing for systems programming.

I've tried and failed learning it about 6 times now. I have yet to think up a project that couldn't be accomplished in python with some performance tweaks or throwing extra hardware at it.

Jump in the discussion.

No email address required.

So is it like Java with a garbage collector built in? I saw some performance graphs and it wasn’t far behind c++. I feel like smart pointers solved most problems but maybe I’ll look at some in-depth videos on it

Jump in the discussion.

No email address required.

its roughly comparable to modern c++ without the 50 years of accumulated garbage.

Jump in the discussion.

No email address required.

This sounds like it sums it up succinctly

Jump in the discussion.

No email address required.

No garbage collector at all.

It's kinda like smart pointers but enforced far more strictly by the compiler.

Jump in the discussion.

No email address required.

How is it different from c/cpp

Jump in the discussion.

No email address required.

It uses an ownership model for memory. It's kinda hard :marseydiehard: to easily explain, but the gist of it is that each dynamic object has a single :marseykiwimom: owner at a time, and doing things like passing it in as a parameter to a function can either give :marseyitsover: up ownership (causing it to become unusable in the original scope), or the function can borrow it and then :marseytransflag: return :marseymonke: ownership back to the original scope.

Jump in the discussion.

No email address required.

Memory safety.

Jump in the discussion.

No email address required.

I just started writing anything performance critical in D and compiling it to a shared object I can use in python

Jump in the discussion.

No email address required.

doing anything large in python is r-slurred

Jump in the discussion.

No email address required.

It's honestly fun to write rust code and easier to read than c++ unless people go crazy with trait bounds

Jump in the discussion.

No email address required.

One of the best things about rust in my short experience was the compiler was much better at telling you exactly what was wrong.

Jump in the discussion.

No email address required.

Better error readouts sounds nice. I think I’ll check it out, it sounds like it is essentially C++ if it was remade with all the modern knowledge we had and none of the baggage

Jump in the discussion.

No email address required.

It’s fun to shit on the rust community, but it is a genuinely nice language once you get over the learning curve

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.