From Jason Gunthorpe, maintainer of 5 Linux kernel subsystems:

IMHO the current situation of Rust does not look like success. It is basically unusable except for unmerged toy projects and it is still not obvious when that will change.

Today I learned that my Apple AGX GPU driver, which is the kernel side to the world's first and only OpenGL and Vulkan certified conformant driver for Apple Silicon GPUs, and also the FOSS community's first fully reverse engineered driver to achieve OpenGL 4.6 conformance, and which is used by thousands of Asahi Linux users in production, and that literally has never had an oops bug in production systems not caused by shared C code (unlike basically every other Linux GPU driver), is "an unmerged toy project".

(He works for Nvidia, I guarantee he's heard of it, considering we beat nouveau and NVK to GL 4.6 conformance.)

I guess this is what Linux kernel maintainers think of us Rust developers, that we only write "toy projects"...

Linux-for-Rust or Rust-for-Linux [LWN.net]

@lina block all attempts at merging useful Rust code in the kernel -> claim that all Rust kernel projects are unmerged so the situation is a failure. Makes perfect sense.

@delroth I like Kees' reply.

I would rather have a million jggs angry at me than one Kees displeased at me. And Mr. Cook did not seem pleased.

@delroth @lina honesty Linus should just take a more strict approach on this. Like “stop this shit, I’m the leader of this project and we WILL merge rust stuff. Accept this or fuck off.” or something, idk
@luana @delroth @lina Good luck with that. Last time he took a stand, it was against C++.

@mrkeen @luana @delroth @lina Well, no. The last time he took a stand, it was to say sched_ext *will* be merged. He deferred it one cycle, but it's landing in Linux 6.12.

https://frontpagelinux.com/news/linus-torvalds-merging-extensible-scheduler-sched_ext-in-linux-6-11/

Linus Torvalds Merging Extensible Scheduler "sched_ext" in Linux 6.11 - Front Page Linux

This week in Linux, Linus Torvalds announced he plans to merge the extensible scheduler "sched_ext" patches for Linux 6.11 even though there has been some objections by other kernel developers. For those unfamiliar, the kernel scheduler decides which process runs on which CPU core, when that happens and for how…

Front Page Linux
@Conan_Kudo @luana @delroth @lina OK so the problem is sorted then !

@mrkeen @Conan_Kudo @luana @delroth @lina

Well the writing is on the wall - rust in Linux is happening. It's just that some people somehow feel threatened, have little egos or are just stuck in their rusted (hehe) old beliefs/way of doing things.

Progress is a slow process (if you don't have a magic stick).

I think, with just a bit more kerfuffle, Linus will speak out. And then it will still be slowly rolling uphill. But lots of uphill battles have still been won.

@lina lol he actually made that argument in his reply. I'm speechless.

> AGX is currently unmerged and serves a tiny and niche user base with no commercial relavance. That is an unmerged toy by my definition.

@delroth I love how he keeps on bringing up RHEL but Asahi *is* the reason why Fedora is turning on Rust in distro kernels now. I'm pretty sure that's doing more to push RHEL to do that eventually than anything else.

Also there are literally companies investing in Asahi these days, just not ones who care about RHEL. But I guess he thinks only RHEL matters and anything else is "a toy" even though one such company has roughly ~the same market cap as RH did before the IBM acquisition today.

@delroth @lina i paid almost a thousand for a high-end AMD GPU, and have been plagued by IRQ kernel panics due to a memory safety bug *affecting several generations of hardware* that is still going unfixed for over *6 months after reporting*.

causing me lost data, wasted evenings on recompiling kernels instead of playing with friends and hours of annoyed rebooting.

and the "unmerged, tiny, niche, non-commercially-relevant" driver is doing better?
well, that should be humiliating, lmao.

@lina WTAF. The more and more I learn about kernel devs, the more I equate them to the vocal minority of the larger Linux community: toxic, entitled, gatekeepery, smarmy assholes.
@ktnjared @lina fwiw the rust community doesn't have a stellar reputation either. might help if everyone involved chilled out a bit.

@lina yeah.. we really need to focus more on getting stuff merged and I'd love for nova and asahi to work together on the bindings/abstractions so we can finally get things going here. And there are people more involved and knowledgeable with drm/kms working on nova, so I'm pretty confident that we can make this work.

And if it means we use a new drm_scheduler written in rust so be it.

@karolherbst @lina would a DRM scheduler in Rust provide APIs also usable by C drivers in replacement of the bad C one ?

@Sobex @lina in theory yes. With rust you can specify the calling convention and every rust function can be compiled with the C one for compatibility.

And then you have "cbindgen" as a project to generate a C header file you simply include and link against.

The really nice think about rust is, that you don't need any kind of FFI code to call C or vice versa. Rust wrappers are really only about writing good abstractions, not about making it possible to use C code in rust or vice versa.

@karolherbst @Sobex You can write Rust that can be called from C, but you have to do that explicitly. The situation doing idiomatic Rust to C abstractions is actually worse than the other way around, because while Rust can support concepts like C struct embedding etc. (just unsafely), there is absolutely no way for C to directly interact with concepts like Rust generics. You'd have to introduce more explicit layers of abstraction in some cases with extra allocations and things like that.

And maybe that's a good thing. If we end up having high quality native Rust code in the kernel and C ends up being a second class citizen if it wants to use it, maybe that'll help convince the C people to learn Rust. We're certainly not going to degrade Rust code to C standards and design just so C people can interact with it in a C way.

@lina @Sobex oh sure, you can't map everything, but if you e.g. have a C API, you can implement that in rust just fine. And then C code can just call into rust code, which might be a better approach here than using cbindgen.
@lina @karolherbst @Sobex can you start with gccrust with the same architectural coverage? I still have phantom pains from projects stopping working because someone pulled in a dependency that wouldn't compile on perfectly capable machines, and it's starting anew with Python's Rust frenzy

@Sobex @karolherbst Probably not easily if written in idiomatic Rust with stuff like generics. I certainly don't plan to spend time thinking about that right now. It'd just be part of the driver, and if Nova wants to share it we'll move it to common Rust code.

Though you can always make wrappers work some way, so perhaps we could task the C people with writing C abstractions to the Rust scheduler if they really want to use it. Let them suffer the cross-language adaptation pain for once...

@lina @karolherbst or you know, rewrite part of their drivers in rust to take advantage of it.

Same as GPL only goodies, Rust only goodies.

@Sobex @karolherbst @lina All problems are solvable, Rust even has macros (IMHO crappy but still better than CPP).

There's but one problem, and its name is 'rustc'.

Rustc architecture coverage (in supported and regularly tested form) is nowhere close providing for still used platforms in Linux kernel. Using Rust for Apple Silicon drivers is fine because ARM64 is supported. Using it for API common across all platforms is a problem.

@lina As an Asahi Linux user, thank you for your work. It is very much appreciated. I'm regularly stunned by how good the Asahi Linux experience is on my little old M1 Mac. Thank you.
@popey @lina I’ll second that Lina and Alyssa, you’ve done outstanding work. Also cudos to @marcan and @sven and all the other ones !
@lina I think you need a line break. I was confused where the quote ends.
@botahamec I think that must be something with your client/instance? It's very clear on the Mastodon/Glitch web and on Tusky.
@lina @botahamec I got five distinct grafs on Ivory
@lina @botahamec similar issue with the mastodon default android app 🤔
@jpetazzo @botahamec Sounds like it strips block quote formatting and also collapses it with the next element. You should probably file a bug ^^
@lina @botahamec Good idea, I just did! Thank you (your concise and accurate wording of the issue was really helpful! 🙏)
@lina there's a bicycle meme that should be posted here i think
@lina And distro rust maintainers like myself (opensuse, suse) have worked with the kernel rust folk to address all the backporting and version stability concerns. Seems a lot more like kernel devs acting like this when faced with the prospect of change:

@lina Too ingrained into the NVIDIA mentality.

Sometimes people need to be humbled down.

@lina wait, wasnt binderfs rewritten in Rust? How is that a toy project?
[PATCH RFC 02/20] rust_binder: add binderfs support to Rust binder - Alice Ryhl

@lina "First they ignore you. Then they ridicule you. And then they attack you and want to burn you. And then they build monuments to you." - Nicholas Klein

https://quoteinvestigator.com/2017/08/13/stages/

Quote Origin: First They Ignore You, Then They Laugh at You, Then They Attack You, Then You Win – Quote Investigator®

@lina An angle I haven't seen mentioned is: where will all the new blood for the Linux kernel come from? I speculate that the average age amongst the Rust fans is lower than that of the C die-hards. If the Ted and friends are driving away the Rust people then Linux will suffer long-term.

@lina I took a quick glance at Redox and even ran the demo (impressive progress). However it's clear that Redox is a Linux alternative, much like *BSD, not a drop-in replacement, with full application compatibility. I don't see it unseating Linux in any near future.

I used Linux from the start and hacked on the 0.12 kernel. I contributed the 1st SCSI driver to 0.95 and fixed bugs in the FPU emulation. The reason Linux made so much progress so fast was because the roadmap was ...
1/2

@lina ... laid out by POSIX and the GNU applications. Basically, runs these apps and you have instant value. Only once Linux reached feature parity with, say, SunOS did it start to seriously extend the feature space.

Redox seems IMO a bit too eager to reinvent the whole world and that will make it a niche effort.

@tommythorn @lina This was IIRC a concern that Linus explicitly voiced when giving Rust in the kernel the initial green light. Well not the driving away part, but the age differences.
@lina yeah; he also seems unaware of the existence of the Hubris OS from Oxide Computer Company
@JamesWidman @lina dunno how Hubris fits into the discussion, AFAIK it's an embedded OS unrelated to the Linux kernel.
On the other hand, I'd love to hear if the @oxidecomputer folks did anything interesting with Rust in their Solaris distro.
@lina wasn't the whole argument that it was unusable upstream because they refuse to merge stuff...?
@lina @awoo I'm learning Rust because it is, in my view, the successor to C/C++ that isn't tied to a major corporation, has a good community ecosystem, and is syntactically efficient, with a lot of extras that the old compilers don't have

@lina That video really captures a sad moment.

“I’M NOT GOING TO LEARN [new thing]!”

“WATCH HOW I PASSIVE-AGGRESSIVELY SABOTAGE YOUR [different thing], YOU SECOND-CLASS CITIZEN.”

@lina to be fair, the Linux kernel is just a hobby, nothing big and professional like GNU. So I think a toy project sounds like a perfect fit.
@lina some people do amazing stuff and can still be blinded by their bias and obsession with a favourite tool.
You do amazing stuff too and there are a lot of us with macs wishing to high five the skin of your palms.
@lina What a condescending twat
@lina I'm so tired of hearing "toy" when people describe rust. I'm so so tired of hearing this so much
@lina
I have been bothered by people revising history before ("nobody expected this" while I loudly expected it), but this is a revising of the present. I wish you strength!

@lina Shitposting (but only a bit):

Oh, that explains the "merging Rust will risk my NVidia investment!1" thing we saw on reddit.

Matrix Multiplications should be incredibly simple to abstract, yet NVidia's AI hype reduces to "the unmatched software quality" (lol yes but $3T market cap can't lie) that nobody else can deliver.

Now you threaten that ecosystem by creating _toys_ that work better than any commercial driver.

Yes, with that I would be very concerned about any NVidia investments.

@felix @lina Nvidia’s software quality is nothing to write home about but matrix multiplications are not actually incredibly simple to abstract unless what you are doing is also incredibly simple and abstract
@lina gcc rust compatibility is a non-opianated constraint against taking Rust code to anything in any arch defconfig.
@lina Yeh; although tbf I think Jason is from the RDMA side of things, which would have been Mellanox which Nvidia bought a few years back; I don't know if they speak to the GPU lot.
@lina The work you do on AGX is fucking AMAZING, beyond impressive. And I say that as someone who is usually on the "worried by rust" team, since I am quite fond of the more obscure architectures , which will probably never be supported by rustc. There seems to be a problem in attitude in *some* of the commercial kernel contributors, who think the linux kernel only exists to serve their bottom line, everything else is "toy projects" and "toy architectures" to them.
@lina Extrapolating one developer's words into "this is what kernel maintainers think" is an obvious logical failure and is not the way to advance the Rust cause. The fact that several kernel maintainers spoke out against the "unmerged toy" description makes it clear that it is not a majority opinion. There are a lot of people in the kernel community who support this work.

@corbet The problem is that as people in the Rust for Linux project we get to write all the abstractions to make things work, and that means interacting with many/all subsystem maintainers and therefore just one or two hostile maintainers can successfully derail the whole effort.

I'm already making a mental list of people to attempt to design around and avoid interacting with, and sometimes it's not even possible.

@lina If you approach a large city with a plan to install a shiny new utility system, you will quickly find yourself dealing with a whole range of bureaucrats, some of whom will be more helpful than others. The kernel project resembles that large city in a number of ways. I don't say this is a good thing, but it is a thing.

I believe that the Rust for Linux project is succeeding. Yes, it is slow and painful, but the people pushing this work are doing the right things and making progress.

The city council (the maintainers summit) is meeting on September 17. Rust will be on the agenda, and there should be a couple of Rust for Linux developers there. That would be a good time to have a well-thought-out proposal for process changes that you would like to see.

@corbet The difference is that people planning shiny new utility systems are probably on someone's payroll and still being paid regardless of how long the bureaucracy drags on or not, so at least they are getting some benefit (money) out of the painful process.

That doesn't really work like that in FOSS, especially not with non-commercial projects like Linux on M1. What that bureaucracy culture does is heavily benefit and prioritize the people employed to work on Linux and paid to deal with the red tape, and hurts people who are not and are just doing it for fun or to push the community forward, or as a side project and not their main employment.

The endgame is that you end up with a bunch of bitter people employed at big companies who do the work for the money, and have no interest in helping onboard new blood or support those who aren't motivated by a big paycheck to fight the community.

Obviously this doesn't describe the entire kernel community and there are good people working at big companies and still fighting the good fight... but I think it does describe how things are shifting overall, and how we're ending up here.

@lina @corbet I was actually trying to convince our IT staff to support Asahi running on company MacBooks. I'll give it another shot soon. We're not a huge company by any means, but if you name a helpful / non trivial (CAD or USD) dollar amount, I'll see what I can do.
@corbet @lina it is also not just one developer. Wedson did himself a diservice by linking to the end of the talk. That part isnt as bad as what happened before. Two people derailing a presentation, objecting before even _hearing_. Not listening to the replies and the organizers not intervening