Live data from Hacker News

Rust in the kernel is no longer experimental

lwn.net

371–380 of 853 posts

Re: Rust in the kernel is no longer experimental

#371
post #323
post #317

Earlier quoted context omitted.

Some people talk about 68k not being supported being a problem

m68k Linux is supported by Rust, even in the LLVM backend. Rust also has an experimental GCC-based codegen backend (based on libgccjit (which isn't used as a JIT)). So platforms that don't have either LLVM nor recent GCC are screwed.

how on earth is linux being compiled for platforms without a GCC?

additionally, I believe the GCC backend is incomplete. the `core` library is able to compile, but rust's `std` cannot be.

Re: Rust in the kernel is no longer experimental

#373

Earlier quoted context omitted.

IIRC, it was not about Rust vs. C, but a commotion rooted from patch quality and not pushing people around about things. Linux Kernel team has this habit of a forceful pushback which breaks souls and hearts when prodded too much. Looks like Hector has deleted his Mastodon account, so I can't look back what he said exactly. Oh, I still have the relevant tab open. It's about code quality: https://news.ycombinator.com/i…

That was a single message in a very large thread. It absolutely was not just about code quality.

Yes, that's the entry of the rabbit hole, and reader is advised to dig their own tunnel.

I remember following the tension for a bit. Yes, there are other subjects about how things are done, but after reading it, I remember framing "code quality" as the base issue.

In high-stakes software development environments, egos run high generally, and when people clash and doesn't back up, sparks happen. If this warning is ignored, then something has to give.

If I'm mistaken, I can enjoy a good explanation and be gladly stand corrected.

This is what happened here. This is probably the second or third time I witness this over 20+ years. Most famous one was over CPU schedulers, namely BFS, again IIRC.

Re: Rust in the kernel is no longer experimental

#375
post #323

Earlier quoted context omitted.

m68k Linux is supported by Rust, even in the LLVM backend. Rust also has an experimental GCC-based codegen backend (based on libgccjit (which isn't used as a JIT)). So platforms that don't have either LLVM nor recent GCC are screwed.

how on earth is linux being compiled for platforms without a GCC? additionally, I believe the GCC backend is incomplete. the `core` library is able to compile, but rust's `std` cannot be.

I don't believe Rust for Linux use std. I'm not sure how much of Rust for Linux the GCC/Rust effort(s) are able to compile, but if it was "all of it" I'm sure we'd have heard about it.

Re: Rust in the kernel is no longer experimental

#376
post #352

Earlier quoted context omitted.

The practical reality is arguably more important than beliefs. Apple has, as it turns out, invested in trying to make Swift more suitable for kernel and similar development, like trying to automate away reference counting when possible, and also offering Embedded Swift[0], an experimental subset of Swift with significant restrictions on what is allowed in the language. Maybe Embedded Swift will be great in the future…

You show a lack of awareness that ISO C and C++ are also not applicable, because on those domains the full ISO language standard isn't available, which is why freestanding is a thing.

But freestanding is not experimental, unlike Embedded Swift according to Apple. And there are full, large OS kernels written in C and C++.

You continue being undeniably, completely wrong.

Re: Rust in the kernel is no longer experimental

#377

Earlier quoted context omitted.

[flagged]

1. This doesn't really matter for the argument. Most of the time you can audit unsafe blocks, in some instances the invariants you are upholding require you to consider more code. The benefit is still that you can design safe interfaces around these smaller bits of audited code. 2. I agree it's harder, I feel like most of the community knows and recognises this. > Maybe Rust proponents should spend more time on makin…

[flagged]

Re: Rust in the kernel is no longer experimental

#378
post #30

Earlier quoted context omitted.

> very slow compilation times That isn't always the case. Slow compilations are usually because of procedural macros and/or heavy use of generics. And even then compile times are often comparable to languages like typescript and scala.

Compared to C, rust compiles much slower. This might not matter on performant systems, but when resources are constrained you definitely notice it. And if the whole world is rewritten in Rust, this will have a non-significant impact on the total build time of a bunch of projects.

Runtime memory issues probably have a significantly higher total cost.

But of course that doesn't negate this cost, but building can always be done on another machine as a way to circumvent the problem.

Re: Rust in the kernel is no longer experimental

#380

I guess it's time to finally try FreeBSD.

BSD development mostly works through the classic approach of pretending that if you write C code and then stare at it really really hard it'll be correct. I'm not actually sure if they've gotten as far as having unit tests. (OpenBSD adds the additional step of adding a zillion security mitigations that were revealed to them in a dream and don't actually do anything.)

They don't do anything yet they segfault some C turd from 'The computational beauty of Nature's. You have no clue about any BSD and it looks. Every BSD has nothing to do which each other.
Post reply on HN