r/osdev • • 2d ago

Rust?

Lately, many people have started using Rust in osdev(and any branch of programming) like fools. Who would use Rust when C is available? It's complete foolish.

Most of these people already know the most about osDev, which is opening Claude AI and saying "make me an OS".

0 Upvotes

21 comments sorted by

10

u/mooglinux 2d ago

Rust offers memory safety, a notoriously difficult thing to get right with C.

-5

u/Ruby7659_OSDV 2d ago

What you call "memory security" applies to normal ring-3 programs. You'll constantly need to use the unsafe keyword when developing an OS anyway, so that memory security won't really do much good.

8

u/Databean 2d ago

Even if half your code is unsafe, you're still getting value out of the compiler checking the other half.

-4

u/Ruby7659_OSDV 2d ago

But compared to Rust's other disadvantages, this is nothing. Furthermore, I'm sure you won't feel free in Rust. If you don't have enough knowledge to handle memory security yourself, it's better not to even bother with osdev.

•

u/pthierry Wants a capability-based microkernel 23h ago

In a microkernel, a very small part is in ring 0. Maybe even a significant part of that could benefit from Rust borrower.

7

u/SnugglyCoderGuy 2d ago

It's complete foolish.

Why is it foolish?

0

u/Ruby7659_OSDV 2d ago

Rust, under the guise of "security" (!), only offers abstraction, while osdev is where you need abstraction the least. It doesn't have as much documentation as C, which has had a massive documentation base since the 1970s.

4

u/Thanksgivingwishbone 2d ago

Redox would like to have a word with you

8

u/MM_X__ 2d ago

That is a point of the post? I didn't get it. Start non-constructive hot debate RUST vs C?

6

u/MM_X__ 2d ago

I think this guy is deadly drunk.

-2

u/Ruby7659_OSDV 2d ago

They call those who tell the truth "drunk."

3

u/MM_X__ 2d ago

You are merely demonstrating your own ignorance and, and lets call it - lack of education.

If you want answers, ask questions. If this is your religion, then there is no point to me to respond.

3

u/Redstones563 2d ago

nice argument senator, why don’t you back that up with a source.

0

u/Ruby7659_OSDV 2d ago

The source is me

2

u/Middlewarian 2d ago

C++ has been getting safer than C for 40 years.

-2

u/Ruby7659_OSDV 2d ago

Well, at least better than Rust, I'm thinking of learning C++ soon too.

4

u/DerekB52 2d ago

Linux has been adding more and more rust code to it's kernel. If Linux is using Rust, it's clearly not foolish to use it.

1

u/SignedInt32 1d ago

I've seen people use pure ASM to create a kernel, so if people prefer Rust, what is it to you that offends you so much is what I don't understand?