10 ms·
Retiring from the Rust for Linux Project – Wedson Almeida Filho
- hitekker 2y ago[flagged]
- Ygg2 2y ago> A passive-aggressive exit, but not unusual compared to other Rust drama. By Linux kernel drama standards, it was a non-event. You have the video segment in text, it was pretty non-technical. "NO! We don't want to encode what our assumptions are! We don't want to learn Rust. What do you mean write down our assumptions?" https://youtu.be/WiPp9YEBV0Q?t=1529 https://youtu.be/WiPp9YEBV0Q?t=1529
- hazn 2y agoi encourage everyone to watch the linked video [0]. reminds me of the recent non-technical arguments made in the freebsd thread [1]. git mailing lists have such a greybeard IRC vibe to them. i will, from now on, use "only accepts patches per mail" as a proxy for "not worth suggesting new ideas to" for all projects. it's a stupid proxy. correlation and causation and all that. but it's a very useful one for your sanity. [0] https://youtu.be/WiPp9YEBV0Q?t=1529 https://youtu.be/WiPp9YEBV0Q?t=1529 [1] https://news.ycombinator.com/item?id=41386697 https://news.ycombinator.com/item?id=41386697
- pseudony 2y agoI did, I'm actually puzzled he referenced this. You have a minority who wants to impose a change, and the concerns outlined in that video by the audience member reflects genuine concerns from many other maintainers and contributors. That this discussion repeats itself can only be taken to be either: 1) Evil C programmers are stodgy and old, and can't/won't get with the program, boo! 2) The Rust minority has, as of yet, failed to properly answer what happens when C APIs change in either signature or semantics, either of which can break the Rust bindings. Some questions: * Who tests to avoid this? * Who's expected to fix it? The one changing the C code, who might not know Rust or a separate bindings team? * Is there a process ? A person to contact/raise the issue with? To get help or to have the work done? * What happens if the bindings cannot be fixed in time for the next Kernel release? Put differently, will Rust bindings changes hold back changes to the C code? If broken bindings indeed can hold back changes, then C changes are held back by Rust and indeed then the onus is on the committer to either forego improving/evolving the C API or pick up Rust and fix the bindings also. In that case, yes, the Rust bindings will either freeze the C API or force the individual contributor to learn Rust. That people repeat their concerns isn't an expression of stupidity any more than a result of the people driving Rust into the kernel have yet to properly communicate how they envision this process to work, I suppose.
- laerus 2y agoWhy the answers to these questions are not the same as if C code was calling other C code?
- pseudony 2y agoThat should be obvious ? The concern from those contributors (and we might soon see the same in QEMU) is that these bindings are essentially a weaponization which forces the great majority of contributors to learn Rust or drop out. Essentially a hostile takeover. If I am contributing to the Linux kernel already, I presumably have a decent grasp of C, the central abstractions in the code I am changing, the email-based patch workflow and so on. So when my code breaks adjacent code, I should have a good chance of fixing those issues also, and most often, this won't become the main body of work. If jamming in Rust bindings means the great mass of existing contributors are forced to learn Rust, whether they wish or not, to either maintain bindings or to drop out altogether, then raising the pitchforks is not an unreasonable response.
- masfoobar 2y agoI try to sit on the fence when it comes to Rust and the Linux kernel. On one end, is Rust the right choice to be included... over others such as Zig or (perhaps) Odin? Are we 10 years too soon to include a "safe language" ???? Then again, we have Linus Torvolds who, in the last 20 years, has been hell-bent against including C++ in the kernel despite backlash.. yet.. he has accepted Rust a year or so ago. He obviously sees Rust in a completely different manner compared to C++ -- even though you could write crap code in Rust as well. I get it -- the amount of harcore C programmers are likely shrinking. This means, over time, the linux kernel will eventually have less maintainers. It seems, to me, that Linus accepts reality that he is getting older (54) and wont be the maintainer forever. The younger generation are going to be the back-bone of keeping the project alive and if they are NOT focusing their efforts on C.. then what are they focusing on? Rust, as good as it is, does have hype riding behind it. We also have other "Nu" languages which are eventually getting their stable releases in the coming months/years. Again, is Rust the right choice? I understand the backlash especially veterans who have put in their efforts on the kernel and have no wish to learn Rust. I am sure there are plenty of Rust people throwing their world views opinions yet barely wrote anything decent in C, if at all. Seems like everyone has an opinion even if their views on the opposite end is lacking. As I say I try to sit on the fence. I have not focused my efforts on Rust but I don't actively object to it. I am just skeptical it has been added too soon to the project... but that is my opinion.
- computably 2y agoRust's 1.0 was 2015. It's been 9 years. It's been adopted for core components in Firefox, and Chromium/Android are likewise moving towards adopting Rust. In general, Rust has seen broad industry adoption from the likes of FAANG, M$, etc. As far as I know, while alternatives like Zig may have their merits, they are simply nowhere close to Rust in terms of maturity and adoption. Not only would it take a decade for them to play catch-up, there's huge uncertainty around whether they will ever reach that point. So even if you assume Rust is approximately average on whatever technical axes, pragmatic concerns suggest it's the only real option. Of course, one can always argue Linux has no need to adopt any new language. I don't think there is any serious concern that Linux will end up with no C programmers left to write kernel code.
- rust_is_dead 2y agoThey let you in, you take a shit on the floor and leave. Who is to blame? I don't blame this guy. It's the people who let the Barbarians in, because politics. Sometimes gates need to be kept.
- thecleaner 2y agoWho was the angry guy who was shouting ?
- SirGiggles 2y agoUnless I'm mistaken, LWN suggests it's Ted Ts'o https://lwn.net/Articles/978738/ https://lwn.net/Articles/978738/
- rwmj 2y agoTed's objection is perfectly reasonable, and the way that Linux works and has always worked internally. If an internal (not userspace) API changes then code that uses that API has to be fixed. He also quite reasonably says that it'll take time to understand the trade-offs of encoding constraints into the type system.
- mlindner 2y agoBringing out silly and absurd strawmen attacks like "you're trying to convince everyone to switch over to the religion as promulgated by Rust" is anything but "perfectly reasonable".
- binary132 2y agomaybe. but is it really FALSE? anyway, the point of the resignation is not wanting to deal with all this, not necessarily taking a side, so I’m not even disagreeing with you. But obviously, it is a disagreeable atmosphere. I don’t find that debatable, even if that’s due to people feeling paranoid about a (nonexistent?) rust religious takeover. I think we can all admit Rust definitely has its ideologues and cult acolytes.
- entropicdrifter 2y agoYes, it's really false. They weren't saying that maintainers couldn't change the API nor that the maintainers who changed the API had to update the Rust part, just that they needed to tell the Rust maintainers what they did and what they intended so that they could correctly encode their underlying assumptions in code. In other words, they simply requested adequate documentation and the response was "I'M NOT LEARNING RUST AND YOU CAN'T MAKE ME", effectively. That is nontechnical nonsense
- overanalytcl 2y agoThe Phoronix forums are always a place of infinite brain rot. Phoronix is valuable, but its forums... No.
- deleted 2y ago[deleted]
- angelochecked 2y agoI'm out of my depth here, and I don't fully understand. From what I gather, Rust restricts the possible pathways in the problem space to ensure certain assumptions in the API and to manage memory safely. Is the issue that C allows for more freedom in exploring all possible pathways, or is the problem rooted only to cultural or else?
- mlindner 2y agoMy understanding is the Linux kernel devs are refusing to explain the API and put it down in writing with clear documentation on what the contract is, and then they further gaslight and twist the situation with messaging like "you're trying to convince everyone to switch over to the religion as promulgated by Rust" (direct quote from a Kernel dev). Basically the worst of the worst behavior.
- binary132 2y agoHave you considered trying to understand the perspectives of people in the C kernel dev camp? This seems awfully biased towards a hermeneutic of “C developer bad, Rust developer good”.
- mlindner 2y agoI'm a C developer. What I see from some in the C kernel dev camp is a refusal to participate, and further an active attempt to stonewall progress. The Rust devs have been highly accommodating in every possible way, but that's just not enough for them.
- yeputons 2y agoIt seems to me that C and Rust approach library APIs with different mindsets. Warning: lots of stereotypes follow. Rust believes APIs should be [close to] impossible to use incorrectly. So we get rich type system, contracts, and other kinds documentation. All corner cases are either impossible because of the type or explicitly written down in the contract. If UB happens because user wrote incorrect code, that's a library's bug because it did not defend against it. C believes the programmer. Documentation typically mentions happy path and some popular errors only. Lots of assumptions are implicit, like thread-safety, reentrance, (lack of) NULLs, lifetimes of inputs/outputs. It's up to the user of the library to figure out restrictions if their usecase is not in the documentation. Common sense and knowledge of C traditions helps. If UB happens because the user did something a bit out of the usual, it's on the user. That brings us to different mindsets of library developers. In Rust you typically write code while proving that it's correct in all theoretically possible cases, otherwise the code does not even compile. If it becomes too hard, you refactor API, possibly making the implementation harder. But your API is kind of nice in the kind. In C you take whatever piece of code you found to be useful, extract it in a function or two and use in the project. If you happen to need that exact code somewhere else, you use it. There is no need to prove that the code always works or that it's a sound abstraction. If it works, it works. If it stops working in some case because of a bad API design, then you decide whether it's worth refactoring or not. That makes the initial implementation simpler, but it lacks contracts by design. So I attribute it to cultural differences between "C programmers" and "Rust programmers". For Rust programmers, "full function contract" is a must, so documenting it seems easy. For C programmers, "full function contract" is not required for writing working code in 95% of cases, so documenting it is extra chore with no benefit.
- noobermin 2y ago[flagged]
- computably 2y agoA short resignation email on a mailing list is about as little drama as I can imagine for, well, resigning. Perhaps by "drama" you're referring to the linked video, but watching the clip, the only drama I see is accusations like "You're trying to convince everyone to switch over to the religion as promulgated by Rust." Regardless of the technical issues, that's an ad hominem with zero technical merit.
- hitekker 2y agoYes, he was pushed over the edge. But what he said is not a lie.
- MiguelX413 2y agohttps://news.ycombinator.com/item?id=41401890 https://news.ycombinator.com/item?id=41401890
- _zagj 2y ago[flagged]
- Ericson2314 2y ago> I truly believe the future of kernels is with memory-safe languages. I am no visionary but if Linux doesn't internalize this, I'm afraid some other kernel will do to it what it did to Unix. This is why I want to work on multi-kernel NixOS — I want to make this threat as credible as possible. If ever new kennel requires one to switch to an entirely different user land arbitrarily, they're just imposing stupid switching costs that hamper competition. If you can easily get your experimental kernel and rig it up with NixOS, we could have a real renaissance for systems programming.
- still_grokking 2y agoDebian is already ported (in parts) to different kernels.
- Ericson2314 2y agoI believe that the GNU/kfreebsd stuff is unfortunately fairly abandoned? I am very interested in https://github.com/nixos-bsd/nixbsd https://github.com/nixos-bsd/nixbsd and then Redox support and then maybe more in the line of https://github.com/nix-community/redoxpkgs https://github.com/nix-community/redoxpkgs afterwards.
- codethief 2y ago> on multi-kernel NixOS Is this something people have been working on, or is this "just" something on your personal todo list? Maybe only tangentially related, but I have been pretty excited about https://spectrum-os.org/ https://spectrum-os.org/
- Ericson2314 2y agoIt is something people have been working on: https://github.com/nixos-bsd/nixbsd https://github.com/nixos-bsd/nixbsd https://spectrum-os.org/ https://spectrum-os.org/ is very cool too! > Spectrum will, for now, be a Linux-based system, with packages from Nixpkgs but not derived from NixOS. This is because NixOS is not actually so flexible/extensible. I hope multi-kernel NixOS helps with that in general
- abdujabbar 2y agoThis was inevitable.
- rc00 2y agoI'm at the point of wishing for the Rust experiment in the Linux kernel to be over. It's become an over-dramatic culture clash of a distraction, taking away from the valuable time that the already over-burdened kernel developers have available. Combine that with the veiled threats and passive aggressive tone of the email and it is all a turn-off. Let the Rust folks go off and do their own kernel project(s). If they can come up with something feasibly better, it will be adopted and they can displace the current C-based Linux kernel. Based on what I've seen of Rust and the crowd that has taken to it, this does not seem a likely outcome. (Worse yet, maintainers are dropping Rust packages for practical reasons.) Still, they should try so that they can see for themselves while leaving the current developers to their existing affairs. Like parents separating two fighting children, both sides of this need to be pulled away and kept separated. The Rust crowd can go off and have their own project(s) and the Linux kernel can continue being only C-based. And never the twain shall meet. If the Rust crowd manages to build something better, it will replace the alternative. If not, they need to accept the reasons why without pleading to social media masses. We've seen PipeWire come along and replace PulseAudio. We've seen X11 keep a stronghold over Wayland. To the Rust crowd, focus your energy on building something somewhere else that you feel is better. To the Linux kernel developer crowd, it's time to move on from this experiment for everyone's peace of mind.
- MiguelX413 2y agoIf Linux is to remain exclusively in the terrible memory unsafe language known as C, then I'm afraid I'll have to switch from Linux, which I've been daily driving for a decade now.
- still_grokking 2y agoI don't think this would go well for Linux. The companies actually paying for the kernel development want Rust. That's a matter of fact. Just see who's sponsoring the Linux Foundation, and check what they said elsewhere about their long term commitment to Rust. The main sponsors would likely just fork Linux should Rust be removed again. Than Linux would be left with "community contributions" and the trademarks, but all the big money would go to the fork. Of course nothing like that will happen. Because Linus knows very well where the money is coming from.
- jmull 2y ago> and to reiterate, no one is trying force anyone else to learn Rust nor prevent refactorings of C code I have no dog in this race, but basic logic says if the linux kernel contains rust code, then a linux kernel dev will either need to learn rust or avoid doing things that require changes to those parts of the code. I don’t know how you can wave this away as “technical nonsense”.
- steveklabnik 2y agoBecause if they do something that requires changes to the Rust code, the Rust for Linux folks will take care of it for them. This has been explained repeatedly.
- jmull 2y agoSure. But then that linux dev is no longer a linux dev. They are a linux C dev who needs to find a full linux dev, explain the issue, and get them to handle it. Now, if rust is only in a few corners of linux, then there isn’t much distinction between a linux C dev and a full linux dev, and it’s no big deal. But the goal appears to be to use it more extensively than that. To me, the entire approach to this is backwards. Rather than trying to force a preconceived solution, turn it around and say to linux devs “Look, memory safety is an issue in linux. What can be done about it?” Let them determine the solution. That’s when you can make the case for rust. (Though you probably won’t be successful if you keep blowing off the concerns of linux devs.)
- MiguelX413 2y agoLinus already made that decision, and it was Rust.
- steveklabnik 2y agoThe case was made. The solution that was determined was to add Rust to the kernel. What you’re suggesting should happen is what has been happening, for a few years now.
- deleted 2y ago
- lousken 2y agolinux kernel should've been rewritten in rust already, it's inevitable ( /s )
- cantrelate 2y agoForget all this drama, I wonder if we can have a Borrow Checker, like the one Rust has, implemented on top of C as an optional feature? And since it's just a compile-time thing, it won't cause any incompatibility or breakage at runtime. I love the idea of having the memory safety features that the Rust compiler offers, but I find Rust unreadable, it hurts my eyes, why do we have to write "let" to define a variable? why did they completely change the syntax if the goal is to be a C alternative!?
- aw1621107 2y ago> I wonder if we can have a Borrow Checker, like the one Rust has, implemented on top of C as an optional feature? In theory, possibly. In practice, there are a number of technical and social obstacles standing in the way of such a feature. The first big technical problem is that standard C is currently not very well-suited for borrow checker-style automated lifetime/ownership analysis. Much of the information the borrow checker needs just not present in the C type system, and while some information may be inferable from function bodies separate compilation and the dynamic nature of ownership make things really hard, if not impossible in the general case. Of course, one could require the addition of lifetime/ownership annotations, but that is a pretty substantial backwards compatibility break - there's a lot of existing C code out there, and they'd need to be annotated to be usable in a Rust-style borrow checker. That's an automatic deal-breaker for a lot of people. So what happens if you just try to work with what you have? Then you basically end up where existing static analysis tools are - they can catch some lifetime/ownership errors, but that's on a best-effort basis an can potentially be very resource-intensive. > why do we have to write "let" to define a variable? The most common explanation I've seen is that it makes parsing and/or type inference easier. In addition, let is also more than just a variable declaration - it can be used more generally for binding/destructuring/pattern matching (e.g., if let Some(Point(x, y)) = p { do_something(x, y) }. > why did they completely change the syntax if the goal is to be a C alternative!? Because those changes are (arguably) improvements?
- cantrelate 2y ago> So what happens if you just try to work with what you have? Then you basically end up where existing static analysis tools are - they can catch some lifetime/ownership errors, but that's on a best-effort basis an can potentially be very resource-intensive. Yeah unfortunately.