linux icon indicating copy to clipboard operation
linux copied to clipboard

Rust in Peace

Open stuffbymax opened this issue 11 months ago • 52 comments

No More Rust in the Kernel

After much debate, it’s become clear that Rust in the kernel is like pineapple on pizza, controversial, divisive, and not everyone agrees it belongs. This merge request boldly takes the step to remove Rust and restore the kernel to its C-only glory.


What this MR does

  1. Eradicates Rust code: All Rust files have been sent to /dev/null (don’t worry, I didn’t cargo them along for the ride).

Risks

  • Some developers may cry.
  • Potential spike in segmentation faults.
  • Kernel development team may face existential crises without a memory-safe language.

Testing

  • Compiled and ran the kernel.
  • Works fine! (At least on my machine.)
  • Randomly poked /proc to confirm it didn’t explode.

stuffbymax avatar Dec 30 '24 01:12 stuffbymax

Hi @stuffbymax!

Thanks for your contribution to the Linux kernel!

Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch.

Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process.

Here's what to do:

  • Format your contribution according to kernel requirements
  • Decide who to send your contribution to
  • Set up your system to send your contribution as an email
  • Send your contribution and wait for feedback

How do I format my contribution?

The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations.

Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea.

You can create patches with git format-patch.

Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary.

Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with.

Both of these are documented in the Submitting Patches documentation that is part of the kernel.

Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this.

Where do I send my contribution?

The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes.

If you don't already know what subsystem your change belongs to, the get_maintainer.pl script in the kernel source can help you.

get_maintainer.pl will take the patch or patches you created in the previous step, and tell you who is responsible for them, and what mailing lists are used. You can also take a look at the MAINTAINERS file by hand.

Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches.

It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.)

How do I send my contribution?

Use git send-email, which will ensure that your patches are formatted in the standard manner. In order to use git send-email, you'll need to configure git to use your SMTP email server.

For more information about using git send-email, look at the Git documentation or type git help send-email. There are a number of useful guides and tutorials about git send-email that can be found on the internet.

How do I get help if I'm stuck?

Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed.

Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine.

If you can't find an answer, there are a few places you can turn:

If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers!

I sent my patch - now what?

You wait.

You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at.

Then, you keep waiting. Three things may happen:

  • You might get a response to your email. Often these will be comments, which may require you to make changes to your patch, or explain why your way is the best way. You should respond to these comments, and you may need to submit another revision of your patch to address the issues raised.
  • Your patch might be merged into the subsystem tree. Code that becomes part of Linux isn't merged into the main repository straight away - it first goes into the subsystem tree, which is managed by the subsystem maintainer. It is then batched up with a number of other changes sent to Linus for inclusion. (This process is described in some detail in the kernel development process guide).
  • Your patch might be ignored completely. This happens sometimes - don't take it personally. Here's what to do:
    • Wait a bit more - patches often take several weeks to get a response; more if they were sent at a busy time.
    • Kernel developers often silently ignore patches that break the rules. Check for obvious violations of the Submitting Patches guidelines, the style guidelines, and any other documentation you can find about your subsystem. Check that you're sending your patch to the right place.
    • Try again later. When you resend it, don't add angry commentary, as that will get your patch ignored. It might also get you silently blacklisted.

Further information

Happy hacking!

This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot.

KernelPRBot avatar Dec 30 '24 01:12 KernelPRBot

bruh

iurjscsi1101500 avatar Dec 30 '24 04:12 iurjscsi1101500

🦀✌️

Sh-Pe avatar Dec 30 '24 08:12 Sh-Pe

lmao

SD-W1972 avatar Dec 30 '24 13:12 SD-W1972

looks like it'll merge right in.

ErvinSabic avatar Jan 02 '25 08:01 ErvinSabic

Works on my machine. Approved

4shadoww avatar Jan 02 '25 22:01 4shadoww

No More Rust in the Kernel

this is only a joke also this is not the actual repo so far i as know this is only a backup so why no some fun

You're not meant to tell people it's a joke. We know it's not the actual repo. That's the fun of it :p

Code-Horror avatar Jan 03 '25 10:01 Code-Horror

RIP Rust. He was a fungi.

myclevorname avatar Jan 03 '25 19:01 myclevorname

xd

siaeyy avatar Jan 07 '25 03:01 siaeyy

Let's keep purging all things, starting with R in the kernel. Approved, lgtm.

I think we should do all we can to cleanse this codebase, and the English language, of anything containing that Unicode codepoint. It isn't impossible to completely ditch it, like what I am saying as an example. If you absolutely had to use it, apologize while intensely sobbing in a 20-minute Youtube video. Excuse me while I make a Youtube video because I quoted you. See this video to see what someone else did to help, of which I am following too. Well, most of it. Oops.

myclevorname avatar Jan 07 '25 05:01 myclevorname

Let's keep purging all things, starting with R in the kernel. Approved, lgtm.

I think we should do all we can to cleanse this codebase, and the English language, of anything containing that Unicode codepoint. It isn't impossible to completely ditch it, like what I am saying as an example. If you absolutely had to use it, apologize while intensely sobbing in a 20-minute Youtube video. Excuse me while I make a Youtube video because I quoted you. See this video to see what someone else did to help, of which I am following too. Well, most of it. Oops.

You didn't get my reference to a recent drama.

izmyname avatar Jan 07 '25 08:01 izmyname

Works on my machine, saw an increase in performance as well. LGTM!

provrb avatar Jan 07 '25 20:01 provrb

LGTM!

sasdallas avatar Jan 08 '25 01:01 sasdallas

wkwkwkw

abazure avatar Jan 13 '25 13:01 abazure

Rewrite it in Haskell; otherwise lgtm

No, rewrite it in Python or Javascript because those languages are more popular.

myclevorname avatar Jan 18 '25 18:01 myclevorname

if works on his machine, works in all machines, please merge this.

PedrelliMath avatar Jan 18 '25 20:01 PedrelliMath

we need to rewrite it in 100% rust.

RobinHirst11 avatar Jan 21 '25 15:01 RobinHirst11

we need to rewrite it in 100% rust.

blasphemy

sasdallas avatar Jan 21 '25 22:01 sasdallas

LGTM!

niooii avatar Jan 22 '25 17:01 niooii

LGTM

Also, the removal of Rust means it can finally compile for the TI-84 Plus CE, whose 24-bit Zilog eZ80 instruction set (based on the Z80) is incompatible with Rust's requirement of pointer lengths being a power of two. It might not be worth it due to the CE's 256 KiB of RAM and 4 MiB of Flash, as well as the 48 MHz processor.

myclevorname avatar Jan 24 '25 01:01 myclevorname

lmao jsjsjs

AkemiKami201 avatar Jan 30 '25 00:01 AkemiKami201

Bro is an operative, hates not being able to find exploits

alexfromapex avatar Jan 30 '25 13:01 alexfromapex

Make Your Own Kernel Based On Linux I Mean BSD And Android Did It So Why Can't you And Stop Wasting Every Coder's Time Your Not Funny Or Special If You Want To Delete Rust in Your Kernel That's Fine Just Leave The Main Linux Kernel Out of it make your Own Kernel.

Nightmare1984 avatar Feb 19 '25 13:02 Nightmare1984

Last comment's written like a youtube title lol

blyxyas avatar Feb 19 '25 16:02 blyxyas

Make Your Own Kernel Based On Linux I Mean BSD And Android Did It So Why Can't you And Stop Wasting Every Coder's Time Your Not Funny Or Special If You Want To Delete Rust in Your Kernel That's Fine Just Leave The Main Linux Kernel Out of it make your Own Kernel.

What you are talking about

stuffbymax avatar Feb 22 '25 20:02 stuffbymax

Does this actually work? Can someone actually test this and see if it works??

SnivySquid65 avatar Feb 26 '25 23:02 SnivySquid65

approved

dalima-dev avatar Feb 27 '25 12:02 dalima-dev

@youwen5 resolve the merge conflicts so this can be integrated; no time to waste in the fight for C purity

quantum9Innovation avatar Mar 02 '25 00:03 quantum9Innovation

Look, I get that people want the kernel to be rust free, but if you want it to be rust free, just use this fork!! You don't NEED to use the mainstream kernel. Install a rust-less patch if you really need to.

SnivySquid65 avatar Mar 02 '25 01:03 SnivySquid65

goated

papaj2139 avatar Mar 02 '25 12:03 papaj2139